This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Gcc optimization flags


It seems that without turning on the -O flag, other optimization flags
won't have any effect ?
Did anybody have any experience in using the flags separately rather
than -Ox ?

If I want to run a single optimization, for instance, unroll-loops, how
can I do without -O (and thus bringing in -fdefer-pop,
-fmerge-constants, -fthread-jumps, -floop-optimize, -fcrossjumping,
-fif-conversion, -fif-conversion2, -fdelayed-branch,
-fguess-branch-probability, -fcprop-registers) which may "pollute" the
result ?

I had a simple test. The results of the following two compilations are
different:
gcc -O foo.c
gcc -fdefer-pop -fmerge-constants -fthread-jumps -floop-optimize
-fcrossjumping -fif-conversion -fif-conversion2 -fdelayed-branch
-fguess-branch-probability -fcprop-registers foo.c

While -O should be equivalent to "-fdefer-pop -fmerge-constants
-fthread-jumps -floop-optimize -fcrossjumping -fif-conversion
-fif-conversion2 -fdelayed-branch -fguess-branch-probability
-fcprop-registers".

Can anybody (expert/insider) give a detailed explanation ?

Thanks a lot,




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]