Should -fcross-jumping be part of -O1?

Robert Dewar dewar@gnat.com
Wed Dec 3 16:12:00 GMT 2003


  > Would we really want -Oaccuracy to range from 0 to 3?  It seems to me
> that you either care about accurate floating point, or you do not.
> It's hard for me to see why anybody would set -Oaccuracy to anything
> other than 0 or 3.  Even if they did, it's hard for me to see how they
> could possibly understand what was going to happen.

You make the mistake of assuming that accurate floating-point is 
well-defined. That's far from the case. There are many possible 
interpretations.

Indeed often the issue is that optimization *increases* accuracy, for 
example by using 80-bit intermediate results on the x86.

Different motivations here are:

1. Keep the results the same when optimized

2. Don't worry too much about precise fpt semantics, do things fast

3. Optimize as much as you can, but respecting language semantics (for
example Ada specifically allows the extra precision mentioned above).

Nothing is simple in this area :-)





More information about the Gcc mailing list