Re: how to avoid default inlining of static functions at O3 ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi John,

On my system, the flag differences between -O2 and -O3 are that -O3 also
enables:
-fgcse-after-reload
-finline-functions
-funswitch-loops

That may not be the same on your platform, however.

You can do this:

echo '' | g++ -O2 -fverbose-asm -S -x c++ - -o O2.txt
echo '' | g++ -O3 -fverbose-asm -S -x c++ - -o O3.txt

And then compare the flag differences on your platform.

Note, I do not know if there are other optimizations enabled by -O3 that do
not have associated flags.

Most optimizations do *NOT* have a knob to enable/disable.  But, perhaps,
most of those non-twiddle-able optimizations are already enabled at -O2.

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux