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]
Other format: [Raw text]

Re: -ffast-math and floating point reordering


>>>>> "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


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