This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFD: HAVE_* pattern flags


On 2012-10-18 00:39, Joseph S. Myers wrote:
> Note: for patterns that involve a machine mode, I think it's better to 
> generate a macro (or function) that takes the mode as a parameter.  This 
> is because most references to modes such as SImode or DFmode in 
> architecture-independent code are in principle dubious and would need to 
> be eliminated for ports to unusual architectures with non-8-bit bytes 
> (rather than being defined in architecture-independent code, it would be 
> better to have a config/8-bit-byte-modes.def that's used by normal 
> architectures but not by any future unusual ones).
> 
> For example, if such macros / functions are generated automatically, 
> c-family/c-cppbuiltin.c:mode_has_fma could cease to hardcode a list of 
> four floating-point modes; instead, the caller could just call the new 
> HAVE_ macro directly, with the mode as a parameter.

Err... that's exactly what optabs are for.

If we need to change when the optabs are initialized to make -save-temps
work, then that will be better than any other solution you may be considering.
This may be easier since the August rewrite of genopinit.c.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]