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: Should -fcross-jumping be part of -O1?


> 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 :-)




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