Mail Archives: djgpp/2001/05/13/10:30:12
Patrick Mitran <pmitran AT tsp DOT ece DOT mcgill DOT ca> wrote:
> I'm using gcc 2.95.3. I was wondering where I could get a list of all the
> optimizations that are turned on by -O6.
About the most complete description of this can be had by asking GCC itself
to show it:
redir -eo O6.txt gcc -c -v -Q -O6 hello.c
Look into the O6.txt file, right after the banner line from 'cc1'. There's
a list of all single options in effect in this GCC run. An example from
a very old Linux box:
GNU C version 2.7.2 (i386 Linux/ELF) compiled by GNU C version 2.7.2.
enabled: -fdefer-pop -fcse-follow-jumps -fcse-skip-blocks \
-fexpensive-optimizations
-fthread-jumps -fstrength-reduce -fpeephole -fforce-mem -ffunction-cse
-finline-functions -finline -fcaller-saves -fpcc-struct-return
-frerun-cse-after-loop -fcommon -fgnu-linker -m80387 -mhard-float
-mno-soft-float -mno-386 -m486 -mieee-fp -mfp-ret-in-387
> Also, do I have to add the -mpentium switch too or is this inclused
> in -O6.
No. "Optimization" should have different effects for different
processor types. Otherwise, -mpentium and friends would be
pointless. Architecture or CPU type settings are thus independent from
optimization flags.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -