diff options
Diffstat (limited to 'contrib/gcc/doc/passes.texi')
-rw-r--r-- | contrib/gcc/doc/passes.texi | 141 |
1 files changed, 49 insertions, 92 deletions
diff --git a/contrib/gcc/doc/passes.texi b/contrib/gcc/doc/passes.texi index 9a1941b..6bbc61c 100644 --- a/contrib/gcc/doc/passes.texi +++ b/contrib/gcc/doc/passes.texi @@ -1,5 +1,5 @@ -@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -@c 1999, 2000, 2001 Free Software Foundation, Inc. +@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +@c 2000, 2001, 2002, 2003 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. @@ -12,7 +12,10 @@ @cindex top level of compiler The overall control structure of the compiler is in @file{toplev.c}. This file is responsible for initialization, decoding arguments, opening and -closing files, and sequencing the passes. +closing files, and sequencing the passes. Routines for emitting +diagnostic messages are defined in @file{diagnostic.c}. The files +@file{pretty-print.h} and @file{pretty-print.c} provide basic support +for language-independent pretty-printing. @cindex parsing pass The parsing pass is invoked only once, to parse the entire input. A @@ -73,54 +76,27 @@ performed by cpplib, which is covered in separate documentation. In particular, the internals are covered in @xref{Top, ,Cpplib internals, cppinternals, Cpplib Internals}. -@c Avoiding overfull is tricky here. -The source files to parse C are -@file{c-convert.c}, -@file{c-decl.c}, -@file{c-errors.c}, -@file{c-lang.c}, -@file{c-objc-common.c}, -@file{c-parse.in}, -@file{c-aux-info.c}, -and -@file{c-typeck.c}, -along with a header file -@file{c-tree.h} -and some files shared with Objective-C and C++. - -The source files for parsing C++ are in @file{cp/}. -They are @file{parse.y}, -@file{class.c}, -@file{cvt.c}, @file{decl.c}, @file{decl2.c}, -@file{except.c}, -@file{expr.c}, @file{init.c}, @file{lex.c}, -@file{method.c}, @file{ptree.c}, -@file{search.c}, @file{spew.c}, -@file{semantics.c}, @file{tree.c}, -@file{typeck2.c}, and -@file{typeck.c}, along with header files @file{cp-tree.def}, -@file{cp-tree.h}, and @file{decl.h}. - -The special source files for parsing Objective-C are in @file{objc/}. -They are @file{objc-act.c}, @file{objc-tree.def}, and @file{objc-act.h}. -Certain C-specific files are used for this as well. - -The files -@file{c-common.c}, +The source files to parse C are found in the toplevel directory, and +by convention are named @file{c-*}. Some of these are also used by +the other C-like languages: @file{c-common.c}, @file{c-common.def}, @file{c-format.c}, @file{c-opts.c}, @file{c-pragma.c}, @file{c-semantics.c}, -and @file{c-lex.c}, -along with header files +@file{c-incpath.c}, +@file{c-ppoutput.c}, +@file{c-cppbuiltin.c}, @file{c-common.h}, @file{c-dump.h}, +@file{c.opt}, +@file{c-incpath.h} and @file{c-pragma.h}, -are also used for all of the above languages. +Files specific to each language are in subdirectories named after the +language in question, like @file{ada}, @file{objc}, @file{cp} (for C++). @cindex Tree optimization @item @@ -261,57 +237,6 @@ the second conditional test. The source code for this pass is in @file{jump.c}. This optimization is only performed if @option{-fthread-jumps} is enabled. -@cindex SSA optimizations -@cindex Single Static Assignment optimizations -@opindex fssa -@item -Static Single Assignment (SSA) based optimization passes. The -SSA conversion passes (to/from) are turned on by the @option{-fssa} -option (it is also done automatically if you enable an SSA optimization pass). -These passes utilize a form called Static Single Assignment. In SSA form, -each variable (pseudo register) is only set once, giving you def-use -and use-def chains for free, and enabling a lot more optimization -passes to be run in linear time. -Conversion to and from SSA form is handled by functions in -@file{ssa.c}. - -@opindex de -The option @option{-de} causes a debugging dump of the RTL code after -this pass. This dump file's name is made by appending @samp{.ssa} to -the input file name. -@itemize @bullet -@cindex SSA Conditional Constant Propagation -@cindex Conditional Constant Propagation, SSA based -@cindex conditional constant propagation -@opindex fssa-ccp -@item -SSA Conditional Constant Propagation. Turned on by the @option{-fssa-ccp} -option. This pass performs conditional constant propagation to simplify -instructions including conditional branches. This pass is more aggressive -than the constant propagation done by the CSE and GCSE passes, but operates -in linear time. - -@opindex dW -The option @option{-dW} causes a debugging dump of the RTL code after -this pass. This dump file's name is made by appending @samp{.ssaccp} to -the input file name. - -@cindex SSA DCE -@cindex DCE, SSA based -@cindex dead code elimination -@opindex fssa-dce -@item -SSA Aggressive Dead Code Elimination. Turned on by the @option{-fssa-dce} -option. This pass performs elimination of code considered unnecessary because -it has no externally visible effects on the program. It operates in -linear time. - -@opindex dX -The option @option{-dX} causes a debugging dump of the RTL code after -this pass. This dump file's name is made by appending @samp{.ssadce} to -the input file name. -@end itemize - @cindex common subexpression elimination @cindex constant propagation @item @@ -365,9 +290,41 @@ Its source files are @file{loop.c} and @file{unroll.c}, plus the header some functions in @file{integrate.c} and the header @file{integrate.h}. Loop dependency analysis routines are contained in @file{dependence.c}. +Second loop optimization pass takes care of basic block level optimizations -- +unrolling, peeling and unswitching loops. The source files are +@file{cfgloopanal.c} and @file{cfgloopmanip.c} containing generic loop +analysis and manipulation code, @file{loop-init.c} with initialization and +finalization code, @file{loop-unswitch.c} for loop unswitching and +@file{loop-unroll.c} for loop unrolling and peeling. + @opindex dL The option @option{-dL} causes a debugging dump of the RTL code after -this pass. This dump file's name is made by appending @samp{.loop} to +these passes. The dump file names are made by appending @samp{.loop} and +@samp{.loop2} to the input file name. + +@cindex jump bypassing +@item +Jump bypassing. This pass is an aggressive form of GCSE that transforms +the control flow graph of a function by propagating constants into +conditional branch instructions. + +The source file for this pass is @file{gcse.c}. + +@opindex dG +The option @option{-dG} causes a debugging dump of the RTL code after +this pass. This dump file's name is made by appending @samp{.bypass} +to the input file name. + +@cindex web construction +@item +Simple optimization pass that splits independent uses of each pseudo +increasing effect of other optimizations. This can improve effect of the +other transformation, such as CSE or register allocation. +Its source files are @file{web.c}. + +@opindex dZ +The option @option{-dZ} causes a debugging dump of the RTL code after +this pass. This dump file's name is made by appending @samp{.web} to the input file name. @item |