This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: rtlanal.c patch for trapping FP compares
- To: gcc-patches at gcc dot gnu dot org
- Subject: Re: rtlanal.c patch for trapping FP compares
- From: lucier at math dot purdue dot edu
- Date: Wed, 13 Dec 2000 07:18:36 -0500 (EST)
- Cc: lucier at math dot purdue dot edu, wilson at cygnus dot com
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