Gcc optimization flags
Long Fei
lfei@ecn.purdue.edu
Wed Aug 6 02:50:00 GMT 2003
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,
More information about the Gcc
mailing list