diff options
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 58 | ||||
-rw-r--r-- | gcc/doc/passes.texi | 22 | ||||
-rw-r--r-- | gcc/doc/tm.texi | 25 |
3 files changed, 103 insertions, 2 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 3789be6fdbd..0c4e6b4366e 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -274,7 +274,8 @@ Objective-C and Objective-C++ Dialects}. @xref{Debugging Options,,Options for Debugging Your Program or GCC}. @gccoptlist{-d@var{letters} -dumpspecs -dumpmachine -dumpversion @gol -fdbg-cnt-list -fdbg-cnt=@var{counter-value-list} @gol --fdump-noaddr -fdump-unnumbered -fdump-translation-unit@r{[}-@var{n}@r{]} @gol +-fdump-noaddr -fdump-unnumbered @gol +-fdump-translation-unit@r{[}-@var{n}@r{]} @gol -fdump-class-hierarchy@r{[}-@var{n}@r{]} @gol -fdump-ipa-all -fdump-ipa-cgraph -fdump-ipa-inline @gol -fdump-statistics @gol @@ -332,7 +333,10 @@ Objective-C and Objective-C++ Dialects}. -finline-functions -finline-functions-called-once -finline-limit=@var{n} @gol -finline-small-functions -fipa-cp -fipa-cp-clone -fipa-marix-reorg -fipa-pta @gol -fipa-pure-const -fipa-reference -fipa-struct-reorg @gol --fipa-type-escape -fivopts -fkeep-inline-functions -fkeep-static-consts @gol +-fipa-type-escape -fira -fira-algorithm=@var{algorithm} @gol +-fira-coalesce -fno-ira-share-save-slots @gol +-fno-ira-share-spill-slots -fira-verbose=@var{n} @gol +-fivopts -fkeep-inline-functions -fkeep-static-consts @gol -fmerge-all-constants -fmerge-constants -fmodulo-sched @gol -fmodulo-sched-allow-regmoves -fmove-loop-invariants -fmudflap @gol -fmudflapir -fmudflapth -fno-branch-count-reg -fno-default-inline @gol @@ -5673,6 +5677,49 @@ optimization. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. +@item -fira +@opindex fira +Use the integrated register allocator (@acronym{IRA}) for register +allocation. It is a default if @acronym{IRA} has been ported for the +target. + +@item -fira-algorithm=@var{algorithm} +Use specified algorithm for the integrated register allocator. The +@var{algorithm} argument should be one of @code{regional}, @code{CB}, +or @code{mixed}. The second algorithm specifies Chaitin-Briggs +coloring, the first one specifies regional coloring based on +Chaitin-Briggs coloring, and the third one which is the default +specifies a mix of Chaitin-Briggs and regional algorithms where loops +with small register pressure are ignored. The first algorithm can +give best result for machines with small size and irregular register +set, the second one is faster and generates decent code and the +smallest size code, and the mixed algorithm usually give the best +results in most cases and for most architectures. + +@item -fira-coalesce +@opindex fira-coalesce +Do optimistic register coalescing. This option might be profitable for +architectures with big regular register files. + +@item -fno-ira-share-save-slots +@opindex fno-ira-share-save-slots +Switch off sharing stack slots used for saving call used hard +registers living through a call. Each hard register will get a +separate stack slot and as a result function stack frame will be +bigger. + +@item -fno-ira-share-spill-slots +@opindex fno-ira-share-spill-slots +Switch off sharing stack slots allocated for pseudo-registers. Each +pseudo-register which did not get a hard register will get a separate +stack slot and as a result function stack frame will be bigger. + +@item -fira-verbose=@var{n} +@opindex fira-verbose +Set up how verbose dump file for the integrated register allocator +will be. Default value is 5. If the value is greater or equal to 10, +the dump file will be stderr as if the value were @var{n} minus 10. + @item -fdelayed-branch @opindex fdelayed-branch If supported for the target machine, attempt to reorder instructions @@ -7384,6 +7431,13 @@ processing. If this limit is hit, SCCVN processing for the whole function will not be done and optimizations depending on it will be disabled. The default maximum SCC size is 10000. +@item ira-max-loops-num +IRA uses a regional register allocation by default. If a function +contains loops more than number given by the parameter, non-regional +register allocator will be used even when option +@option{-fira-algorithm} is given. The default value of the parameter +is 20. + @end table @end table diff --git a/gcc/doc/passes.texi b/gcc/doc/passes.texi index daeaf9520e1..9004dd763ec 100644 --- a/gcc/doc/passes.texi +++ b/gcc/doc/passes.texi @@ -841,6 +841,28 @@ Global register allocation. This pass allocates hard registers for the remaining pseudo registers (those whose life spans are not contained in one basic block). The pass is located in @file{global.c}. +@item +The optional integrated register allocator (@acronym{IRA}). It can be +used instead of the local and global allocator. It is called +integrated because coalescing, register live range splitting, and hard +register preferencing are done on-the-fly during coloring. It also +has better integration with the reload pass. Pseudo-registers spilled +by the allocator or the reload have still a chance to get +hard-registers if the reload evicts some pseudo-registers from +hard-registers. The allocator helps to choose better pseudos for +spilling based on their live ranges and to coalesce stack slots +allocated for the spilled pseudo-registers. IRA is a regional +register allocator which is transformed into Chaitin-Briggs allocator +if there is one region. By default, IRA chooses regions using +register pressure but the user can force it to use one region or +regions corresponding to all loops. + +Source files of the allocator are @file{ira.c}, @file{ira-build.c}, +@file{ira-costs.c}, @file{ira-conflicts.c}, @file{ira-color.c}, +@file{ira-emit.c}, @file{ira-lives}, plus header files @file{ira.h} +and @file{ira-int.h} used for the communication between the allocator +and the rest of the compiler and between the IRA files. + @cindex reloading @item Reloading. This pass renumbers pseudo registers with the hardware diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 9b4a921883f..3087694a9cd 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -2026,6 +2026,18 @@ The macro body should not assume anything about the contents of On most machines, it is not necessary to define this macro. @end defmac +@defmac IRA_HARD_REGNO_ADD_COST_MULTIPLIER (@var{regno}) +In some case register allocation order is not enough for the +Integrated Register Allocator (@acronym{IRA}) to generate a good code. +If this macro is defined, it should return a floating point value +based on @var{regno}. The cost of using @var{regno} for a pseudo will +be increased by approximately the pseudo's usage frequency times the +value returned by this macro. Not defining this macro is equivalent +to having it always return @code{0.0}. + +On most machines, it is not necessary to define this macro. +@end defmac + @node Values in Registers @subsection How Values Fit in Registers @@ -2814,6 +2826,19 @@ as below: @end smallexample @end defmac +@defmac IRA_COVER_CLASSES +The macro defines cover classes for the Integrated Register Allocator +(@acronym{IRA}). Cover classes are a set of non-intersecting register +classes covering all hard registers used for register allocation +purposes. Any move between two registers in the same cover class +should be cheaper than load or store of the registers. The macro +value should be the initializer for an array of register class values, +with @code{LIM_REG_CLASSES} used as the end marker. + +You must define this macro in order to use the integrated register +allocator for the target. +@end defmac + @node Old Constraints @section Obsolete Macros for Defining Constraints @cindex defining constraints, obsolete method |