This is the mail archive of the gcc-patches@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]

[PATCH] optimization docs part 2





Here's the flag listing for the -O flags.  I scanned the sources to try to
get these lists right, but there may still be errors.  Please let me know
and I'll fix up the lists to match reality.

2002-08-30 Jerry Quinn <jlquinn@us.ibm.com>
      * gcc/gcc/doc/invoke.texi (Optimization Options): List the options
enabled by each -O flag.

--- gcc/gcc/doc/invoke.texi.safe           2002-08-25 01:03:45.000000000
-0400
+++ gcc/gcc/doc/invoke.texi          2002-08-25 01:05:21.000000000 -0400
@@ -3196,6 +3196,22 @@
 time, without performing any optimizations that take a great deal of
 compilation time.

+@option{-O} turns on the following optimizations:
+@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
 @opindex O2
 Optimize even more.  GCC performs nearly all supported optimizations
@@ -3204,11 +3220,24 @@
 As compared to @option{-O}, this option increases both compilation time
 and the performance of the generated code.

-@option{-O2} turns on all optional optimizations except for loop
-unrolling, function inlining, and register renaming.  It also turns on
-the @option{-fforce-mem} and @option{-fstrict-aliasing} option on all
-machines and frame pointer elimination on machines where doing so does
-not interfere with debugging.
+@option{-O2} turns on all optimizations specified by @option{-O}.  It
+also turns on the following optimizations:
+@gccoptlist{-fforce-mem
+-foptimize-sibling-calls
+-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
+-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
 invoking @option{-O2} on programs that use computed gotos.
@@ -3221,7 +3250,7 @@

 @item -O0
 @opindex O0
-Do not optimize.
+Do not optimize.  This is equivalent to not using any optimization flags.

 @item -Os
 @opindex Os
@@ -3229,6 +3258,11 @@
 do not typically increase code size.  It also performs further
 optimizations designed to reduce code size.

+@option{-Os} disables the following optimization flags:
+@gccoptlist{-falign-functions  -falign-jumps  -falign-loops
+-falign-labels  -fprefetch-loop-arrays}
+
+
 If you use multiple @option{-O} options, with or without level numbers,
 the last such option is the one that is effective.
 @end table


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