Richard Guenther wrote:

> This is a proposal to introduce an optimization level -Ofast
> that can collect (target specific) optimization flags that
> can affect runtime behavior such as -funsafe-math-optimizations
> or -mrecip.

I think that makes sense.  Defining what's allowed in these cases is
always tricky (there was a long thread a couple of years back in which
we tried to get some scoping on just what -ffast-math might be allowed
to do), but I think the short answer is "this option will try to make
your program go faster, even if that means doing things the standards do
not allow the compiler to do".

> Currently none of the standard optimization levels have this
> kind of affect and we should not change that (people might
> argue that -funsafe-math-optimizations can go into -O3).

I agree that -O3 should not violate the standards.  However, I don't
agree that it shouldn't be target-specific.  (It's quite possible that
we agree; I'm interpreting your words.)  If there's a magic option that
makes MIPS go faster but makes Power go slower, then -O3 on MIPS should
most definitely turn it on, and -O3 on Power most definitely should not.
 As a user, I don't want to know about the option; I just want -O3 to
generate fast code.

-- 
Mark Mitchell
CodeSourcery
m...@codesourcery.com
(650) 331-3385 x713

Reply via email to