[PATCH] Add fma support to the middle end and powerpc

Michael Meissner meissner@linux.vnet.ibm.com
Thu Oct 14 21:37:00 GMT 2010


On Thu, Oct 14, 2010 at 12:03:24PM -0700, Richard Henderson wrote:
> On 10/14/2010 11:00 AM, Michael Meissner wrote:
> > On Thu, Oct 14, 2010 at 07:57:50AM -0700, Richard Henderson wrote:
> >> Frankly I don't see what's so holy about c-cppbuiltin that it can't
> >> have access to tm.h.
> > 
> > I dunno, there seemed to be a desire to remove the rtl stuff from the front
> > ends.
> 
> Would the objecting party please step forward?

Well if you try to include rtl.h (so that optabs.h can be included), you get:

	{dir}/gcc/rtl.h:22:9: error: attempt to use poisoned "GCC_RTL_H"
 
> Because I'd like to argue that c-cppbuiltin.c having access to insn-flags.h
> in order to set FMA_FAST is no different than what it currently done with
> TARGET_FLT_EVAL_METHOD, or for that matter any of the FLT* or DBL* defines.

My original patch in fact did this for standard targets where float == SF,
double == DF, and long double was either TF or XF, but the trouble is while you
can do:

	#ifdef HAVE_FMADF4
	  if (HAVE_FMADF4) ...
	#endif

But then you need to map what the front end thinks float, double, and long
double resolve to, and optab is the logical place, and Joseph Myers rightly
objected to it (it was a hack).  But I will put in a function in something that
deals with rtl, and call it from c-cppbuiltin.c.

-- 
Michael Meissner, IBM
5 Technology Place Drive, M/S 2757, Westford, MA 01886-3141, USA
meissner@linux.vnet.ibm.com



More information about the Gcc-patches mailing list