This is the mail archive of the
mailing list for the GCC project.
Re: RFD: HAVE_* pattern flags
On 2012-10-17 10:31, Joern Rennecke wrote:
> - What would a good naming scheme be?
> - Change the semantics of the HAVE_pattern macros for officially named
> patterns so that they are defined as 0 when the pattern is not provided?
> That choice would actually force people to change #ifdef into if (),
> without the possibility of #if, where targets can have non-constant
> pattern predicates.
I'm preferential for this, because that's what I've tended to sprinkle across
the sources as needed when writing new code:
# define HAVE_foo 0
# define gen_foo(x,y,z) (gcc_unreachable(), NULL_RTX)
> - Have_pattern?
> - have_pattern?
> - any other preferences?
I don't see any reason to stray from HAVE_pattern.
> - how do we get the list of 'official' named patterns?
> - We could have a header file that is maintained by hand, with a string
> of #ifdef / #define / #endif .
This could be trivially integrated with genopinit and optabs.def,
if we cared to do so. I'm not committed to that idea though.