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


On Mar 26, 2004, at 4:41 PM, Robert Dewar wrote:
Dale Johannesen wrote:
One point I haven't seen yet:
A couple of strict-constructionists have asserted that people
who want reassociation done in a nonstandard way can easily rewrite their
code to achieve this. This is not really true, because such expressions
often arise as a result of other optimizations, in a way that isn't obvious
from the source. Offhand, inlining, unrolling, and constant/copy propagation
can all do it, and there are probably more.

Well in the absence of the (very annoying) extra precision phenomenon, none of these optimizations should have observable effects.

Untrue. If two of a+b+c are constant, for example, you want to add the
constants at compile time (assuming your requirements for accuracy
are satisfied). This is exactly the sort of thing that's exposed by other
optimiziations.



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