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]

Re: rtlanal.c patch for trapping FP compares


If gcc knew that fp compares didn't trap, then 
the compiler could generate faster code.  And if you're
running with IEEE arithmetic in nontrapping mode, then
no fp instructions would trap, and you could move fp
instructions outside of loops, you wouldn't have to kill
them at the beginning of blocks with abnormal edges, etc..

But there is no architecture-independent way to know that
now, since it relies on a combination of compiler, run-time
library, etc.  Perhaps it's time to have an architecture-
independent flag

-ffast-ieee-math

that subsumes -fno-math-errno (which does not set errno
on fp exceptions) but would add the extra knowledge that
no fp instructions trap, etc.  It would be up to the
programmer to make sure that any needed processor flags
or environment variables are set correctly.  But that is
similar to the situation now for some things.

Brad Lucier

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