-O more than the sum of its parts?

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

 



>From the following page

http://gcc.gnu.org/onlinedocs/gcc-4.2.2/gcc/Optimize-Options.html#Optimize-Options

I gather that using GCC 4.2.2 with the -O option is the equivalent of
using all of the following options explicitly: -fdefer-pop
-fdelayed-branch -fguess-branch-probability -fcprop-registers
-fif-conversion -fif-conversion2 -ftree-ccp -ftree-dce
-ftree-dominator-opts -ftree-dse -ftree-ter -ftree-lrs -ftree-sra
-ftree-copyrename -ftree-fre -ftree-ch -funit-at-a-time
-fmerge-constants -fomit-frame-pointer

However, experiment tells me that this is far from true.  When I
compile the same c file both ways, the object file produced with -O is
around 20% smaller than the one produced with all of the individual
optimizations added.  Before filing a bug or investigating further, I
wanted to ask the list: is my interpretation of the -O switch
incorrect?  Is it more than just the sum of those individual
optimizations?

I’m using sles9 sp3 on an x86-64 machine, and the observation hold
whether using -m32 or -m64 and also whether I include or exclude
-fomit-frame-pointer

thanks for your help,
Drew


[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