Re: list of optimizations done by -O1 level

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

 



Hi Ranjith,

I don't have an answer to your inquiry, but here's a helpful trick to answer
the "Hmmm, I wonder what flags are controlled by the optimization level
flags?" ...

echo '' | g++     -fverbose-asm -S -x c++ - -o blank.s
echo '' | g++ -O0 -fverbose-asm -S -x c++ - -o O0.s
echo '' | g++ -O1 -fverbose-asm -S -x c++ - -o O1.s
echo '' | g++ -O2 -fverbose-asm -S -x c++ - -o O2.s
echo '' | g++ -O3 -fverbose-asm -S -x c++ - -o O3.s
echo '' | g++ -Os -fverbose-asm -S -x c++ - -o Os.s

Note: there are optimizations above-and-beyond the ones that are
identifiable by a specific named flag.

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