This is the mail archive of the gcc-patches@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: RFA: -mfpmath=sse -fpic vs double constants


On Jul 8, 2005, at 9:32 AM, Paolo Bonzini wrote:
Like this; untested, but pretty obvious. Ok for mainline?

David Edelsohn disapproved this on IRC because PPC benefits from this (also performance-wise).

I know, that's why I didn't try this.
In principal I also would prefer a solution in or near compress_float_constant; it's cleaner
to do things right in the first place than rely on some later pass to clean them up. But we
need to do a target-dependent cost comparison, as David says. I think we might need to
look at a little more context than just the constant, also, as some FP constants are valid as
immediate operands and others aren't in some cases (e.g. FLDPI on x86).
Nobody's objected to the general approach, so I'll play around with it....


It is possible to change compress_float_constant to do the change only if {cost_of_load_single}+{cost_of_extend} <= {cost_of_load_double}.

Unfortunately a change to compress_float_constant needs auditing on all targets that explicitly test the cost of FLOAT_EXTEND. These are:
- alpha
- i386
- mips
- rs6000, whose cost can be lowered to 0 for DFmode
- sparc
- vax, whose cost have to be checked anyway according to a comment.


Paolo


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