This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Optimization Question
- To: gcc at gcc dot gnu dot org
- Subject: Re: Optimization Question
- From: Tim Hollebeek <tim at wagner dot princeton dot edu>
- Date: Wed, 28 Jul 1999 14:43:32 -0400 (EDT)
Jeffrey A Law writes ...
>
> In message <199907281712.NAA00732@ronispc.chem.mcgill.ca>you write:
> > I think Jerry has made a good point. As far as I know, -ffast-math
> > (not to mention -mno-ieee-fp) can alter the results of calculations,
> > albeit often in cases where the results are likely to be wrong in any
> > case.
> -ffast-math is allowed to alter results, particularly around boundary
> conditions (ie stuff like allowing X + 0 -> X).
>
> Allowing some reassociations with -ffast-math is (IMHO) reasonable. But we
> want to be careful that we do not go overboard as that would make -ffast-math
> useless.
I propose that -ffast-math be limited to minor technicalities where
code is significantly slower due to the need to handle rare
exceptional cases.
"Optimizations" that introduce errors that can be larger than the
results themselves in many common cases should be controlled by a
different switch, perhaps named -fwrong-answer-very-quickly.
-Tim