This is the mail archive of the gcc@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: Optimization Question


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


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