This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Regarding -fno optimization options
- From: Ian Lance Taylor <iant at google dot com>
- To: Ralf Jahr <ralf dot jahr at informatik dot uni-augsburg dot de>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 2 Aug 2012 01:20:41 -0700
- Subject: Re: Regarding -fno optimization options
- References: <CAOS5qvT0qCXO=WoNqu9LFbddaS_O0c5O1CxsTAUy-BZq0pC8+A@mail.gmail.com> <CAOS5qvTCGiPX6QfJ+qLo+PdR3t_sCQ4kB-QCh4+PmXh7_VWSnQ@mail.gmail.com> <CAH6eHdRfYgHUFSc4LaGHZuJaG6VBNWDUQ0+ugoEwjT_2HP5CRg@mail.gmail.com> <CAOS5qvSgH=BDL_d40PqpC40mBiMY+mOF0ZXcpfCbsDC21x19YQ@mail.gmail.com> <501A372D.9080703@informatik.uni-augsburg.de>
On Thu, Aug 2, 2012 at 1:15 AM, Ralf Jahr
<ralf.jahr@informatik.uni-augsburg.de> wrote:
> Hi,
>
> I tried in the last days to reconstruct an optimization level by just using
> the individual optimization flags. Well, it did not work at all.
>
> My basic idea was to take the list from "-Q -v" and use it. But there still
> were some differences where comparing the list from a basic optimization
> level with the list from the flags.
>
> Also, as I am working with a processor simulator (gem5), I was able to
> compare the performance of both programs. There was a big difference between
> using e.g. O3 and setting the flags.
>
> Also I found this FAQ entry:
>
> http://gcc.gnu.org/wiki/FAQ#optimization-options
>
> Ian, is this still valid?
Yes.
The -O option is not simply the sum of -f options. Different -O
levels enable optimizations that are not controlled by any -f option.
Also, some -f options depend on a specific -O level.
Ian