This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -ffast-math and floating point reordering
- From: Paul Koning <pkoning at equallogic dot com>
- To: Joe dot Buck at synopsys dot COM
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 25 Mar 2004 09:24:51 -0500
- Subject: Re: -ffast-math and floating point reordering
- References: <20040324170719.A12420@synopsys.com>
>>>>> "Joe" == Joe Buck <Joe.Buck@synopsys.COM> writes:
Joe> ...If -ffast-math is specified, what should we do? One option is
Joe> to use the K&R rule and free-associate at will. I feel
Joe> uncomfortable with that because of the major loss in accuracy
Joe> that can result. If, however, we implement support for the
Joe> Fortran rules, one option would be to relax order of evaluation
Joe> when there are no parentheses (like Fortran), another would be
Joe> to just leave the order the same.
I believe there are also cases where the programmer has good reason to
believe that such transformations should be allowed because the
accuracy properties are appropriate for the application. It would be
good to be able to say so. Perhaps the switch (-ffree-association?)
should be part of -ffast-math, perhaps not. But it would give
non-Fortran programmers a way to get to the optimization opportunities
that Fortran has.
paul