This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Should -fcross-jumping be part of -O1?
Robert Dewar <dewar@gnat.com> writes:
> > 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.
Granted. I was thinking of the ability to prove algorithm
characteristics based on the IEEE spec, which is something I've done
in the past. To me that is accurate floating point. But I can see
that others may think that accurate floating point means something
else.
> 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).
I think this indicates that -Oaccuracy doesn't make sense. I also
think you left out the option which matters for C/C++ numeric
programming, which is strict IEEE semantics even though the language
does not require them.
Ian