how to avoid default inlining of static functions at O3 ?
Fri Sep 26 20:41:00 GMT 2008
On my system, the flag differences between -O2 and -O3 are that -O3 also
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.
More information about the Gcc-help