Commit fad893da by Jerry Quinn Committed by Gerald Pfeifer

invoke.texi (Optimization Options): List the options enabled by each -O flag.

	* gcc/doc/invoke.texi (Optimization Options): List the options
	enabled by each -O flag.

From-SVN: r60692
parent eddcae5a
2002-12-31 Jerry Quinn <jlquinn@optonline.net>
* gcc/doc/invoke.texi (Optimization Options): List the options
enabled by each -O flag.
2002-12-31 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> 2002-12-31 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* doc/install.texi (Configuration): Explicitly refer * doc/install.texi (Configuration): Explicitly refer
......
...@@ -3390,6 +3390,21 @@ With @option{-O}, the compiler tries to reduce code size and execution ...@@ -3390,6 +3390,21 @@ With @option{-O}, the compiler tries to reduce code size and execution
time, without performing any optimizations that take a great deal of time, without performing any optimizations that take a great deal of
compilation time. compilation time.
@option{-O} turns on the following optimization flags:
@gccoptlist{-fdefer-pop
-fmerge-constants
-fthread-jumps
-floop-optimize
-fcrossjumping
-fif-conversion
-fif-conversion2
-fdelayed-branch
-fguess-branch-probability
-fcprop-registers}
@option{-O} also turns on @option{-fomit-frame-pointer} on machines
where doing so does not interfere with debugging.
@item -O2 @item -O2
@opindex O2 @opindex O2
Optimize even more. GCC performs nearly all supported optimizations Optimize even more. GCC performs nearly all supported optimizations
...@@ -3398,11 +3413,25 @@ perform loop unrolling or function inlining when you specify @option{-O2}. ...@@ -3398,11 +3413,25 @@ perform loop unrolling or function inlining when you specify @option{-O2}.
As compared to @option{-O}, this option increases both compilation time As compared to @option{-O}, this option increases both compilation time
and the performance of the generated code. and the performance of the generated code.
@option{-O2} turns on all optional optimizations except for loop @option{-O2} turns on all optimization flags specified by @option{-O}. It
unrolling, function inlining, and register renaming. It also turns on also turns on the following optimization flags:
the @option{-fforce-mem} and @option{-fstrict-aliasing} option on all @gccoptlist{-fforce-mem
machines and frame pointer elimination on machines where doing so does -foptimize-sibling-calls
not interfere with debugging. -fstrength-reduce
-fcse-follow-jumps -fcse-skip-blocks
-frerun-cse-after-loop -frerun-loop-opt
-fgcse -fgcse-lm -fgcse-sm
-fdelete-null-pointer-checks
-fexpensive-optimizations
-fregmove
-fschedule-insns -fschedule-insns2
-fsched-interblock -fsched-spec
-fcaller-saves
-fpeephole2
-freorder-blocks -freorder-functions
-fstrict-aliasing
-falign-functions -falign-jumps
-falign-loops -falign-labels}
Please note the warning under @option{-fgcse} about Please note the warning under @option{-fgcse} about
invoking @option{-O2} on programs that use computed gotos. invoking @option{-O2} on programs that use computed gotos.
...@@ -3415,7 +3444,7 @@ Optimize yet more. @option{-O3} turns on all optimizations specified by ...@@ -3415,7 +3444,7 @@ Optimize yet more. @option{-O3} turns on all optimizations specified by
@item -O0 @item -O0
@opindex O0 @opindex O0
Do not optimize. Do not optimize. This is the default.
@item -Os @item -Os
@opindex Os @opindex Os
...@@ -3423,6 +3452,10 @@ Optimize for size. @option{-Os} enables all @option{-O2} optimizations that ...@@ -3423,6 +3452,10 @@ Optimize for size. @option{-Os} enables all @option{-O2} optimizations that
do not typically increase code size. It also performs further do not typically increase code size. It also performs further
optimizations designed to reduce code size. optimizations designed to reduce code size.
@option{-Os} disables the following optimization flags:
@gccoptlist{-falign-functions -falign-jumps -falign-loops
-falign-labels -freorder-blocks -fprefetch-loop-arrays}
If you use multiple @option{-O} options, with or without level numbers, If you use multiple @option{-O} options, with or without level numbers,
the last such option is the one that is effective. the last such option is the one that is effective.
@end table @end table
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment