aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorVladimir Makarov <vmakarov@redhat.com>2009-10-14 16:24:11 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>2009-10-14 16:24:11 +0000
commit1833192f30abf95ec0124033882e6bcb64552e6f (patch)
tree793540b6a00bb42653fb0e372d22502ee7bdf535 /gcc/doc
parent200c8750d65ebebc8a0d6f6f77a7f02b5a4a8ef3 (diff)
downloadgcc-1833192f30abf95ec0124033882e6bcb64552e6f.zip
gcc-1833192f30abf95ec0124033882e6bcb64552e6f.tar.gz
gcc-1833192f30abf95ec0124033882e6bcb64552e6f.tar.bz2
params.def (PARAM_IRA_LOOP_RESERVED_REGS): New.
2009-09-26 Vladimir Makarov <vmakarov@redhat.com> * params.def (PARAM_IRA_LOOP_RESERVED_REGS): New. * params.h (IRA_LOOP_RESERVED_REGS): New * tree-pass.h (pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. * passes.c (pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. (pass_reginfo_init): Move before loop optimizations. * config/i386/i386.h (STACK_REG_COVER_CLASS): Define. * common.opt (fira-loop-pressure): New. * toplev.h (flag_ira_loop_pressure): New. * rtl.h (init_subregs_of_mode, finish_subregs_of_mode): New externals. * reginfo.c (init_subregs_of_mode, finish_subregs_of_mode): Make external and void type functions. (gate_subregs_of_mode_init, pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. * ira-costs.c (init_costs): Call init_subregs_of_mode. * regmove.c: Include ira.h. (regmove_optimize): Call ira_set_pseudo_classes after IRA based register pressure calculation in loops. * loop-invariant.c: Include REGS_H and ira.h. (struct loop_data): New members max_reg_pressure, regs_ref, and regs_live. (struct invariant): New member orig_regno. (curr_loop): New variable. (find_exits): Initialize regs_ref and regs_live. (create_new_invariant): Initialize orig_regno. (get_cover_class_and_nregs): New. (get_inv_cost): Make aregs_needed an array. Use regs_needed as an array. Add code for flag_ira_loop_pressure. (gain_for_invariant): Make new_regs an array. Add code for flag_ira_loop_pressure. (best_gain_for_invariant): Ditto. (set_move_mark): New parameter gain. Use it for debugging output. (find_invariants_to_move): Make regs_needed and new_regs an array. Add code for flag_ira_loop_pressure. (move_invariant_reg): Set up orig_regno. (move_invariants): Set up reg classes for pseudos for flag_ira_loop_pressure. (free_loop_data): Clear regs_ref and regs_live. (curr_regs_live, curr_reg_pressure, regs_set, n_regs_set, get_regno_cover_class, change_pressure, mark_regno_live, mark_regno_death, mark_reg_store, mark_reg_clobber, mark_reg_death, mark_ref_regs, calculate_loop_reg_pressure): New. (move_loop_invariants): Calculate pressure. Initialize curr_loop. * ira.c (ira): Call ira_set_pseudo_classes after IRA based register pressure calculation in loops if new regs were added. Call finish_subregs_of_mode. * opts.c (decode_options): Set up flag_ira_loop_pressure. * Makefile.in (loop-invariant.o): Add ira.h. (regmove.o): Ditto. * doc/invoke.texi (-fira-loop-pressure, ira-loop-reserved-regs): Describe. * doc/tm.texi (STACK_REG_COVER_CLASS): Describe. From-SVN: r152770
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi22
-rw-r--r--gcc/doc/tm.texi5
2 files changed, 25 insertions, 2 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 3f131fd..ddcde71 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -346,7 +346,8 @@ Objective-C and Objective-C++ Dialects}.
-finline-small-functions -fipa-cp -fipa-cp-clone -fipa-matrix-reorg -fipa-pta @gol
-fipa-pure-const -fipa-reference -fipa-struct-reorg @gol
-fipa-type-escape -fira-algorithm=@var{algorithm} @gol
--fira-region=@var{region} -fira-coalesce -fno-ira-share-save-slots @gol
+-fira-region=@var{region} -fira-coalesce @gol
+-fira-loop-pressure -fno-ira-share-save-slots @gol
-fno-ira-share-spill-slots -fira-verbose=@var{n} @gol
-fivopts -fkeep-inline-functions -fkeep-static-consts @gol
-floop-block -floop-interchange -floop-strip-mine -fgraphite-identity @gol
@@ -5719,7 +5720,8 @@ invoking @option{-O2} on programs that use computed gotos.
Optimize yet more. @option{-O3} turns on all optimizations specified
by @option{-O2} and also turns on the @option{-finline-functions},
@option{-funswitch-loops}, @option{-fpredictive-commoning},
-@option{-fgcse-after-reload} and @option{-ftree-vectorize} options.
+@option{-fgcse-after-reload}, @option{-ftree-vectorize} and
+@option{-fira-loop-pressure} options.
@item -O0
@opindex O0
@@ -6216,6 +6218,14 @@ give the best results in most cases and for most architectures.
Do optimistic register coalescing. This option might be profitable for
architectures with big regular register files.
+@item -fira-loop-pressure
+@opindex fira-loop-pressure
+Use IRA to evaluate register pressure in loops for decision to move
+loop invariants. Usage of this option usually results in generation
+of faster and smaller code but can slow compiler down.
+
+This option is enabled at level @option{-O3}.
+
@item -fno-ira-share-save-slots
@opindex fno-ira-share-save-slots
Switch off sharing stack slots used for saving call used hard
@@ -8387,6 +8397,14 @@ lower quality register allocation algorithm will be used. The
algorithm do not use pseudo-register conflicts. The default value of
the parameter is 2000.
+@item ira-loop-reserved-regs
+IRA can be used to evaluate more accurate register pressure in loops
+for decision to move loop invariants (see @option{-O3}). The number
+of available registers reserved for some other purposes is described
+by this parameter. The default value of the parameter is 2 which is
+minimal number of registers needed for execution of typical
+instruction. This value is the best found from numerous experiments.
+
@item loop-invariant-max-bbs-in-loop
Loop invariant motion can be very expensive, both in compile time and
in amount of needed compile time memory, with very large loops. Loops
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 8588852..57e2b76 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -2349,6 +2349,11 @@ with it, as well as defining these macros.
Define this if the machine has any stack-like registers.
@end defmac
+@defmac STACK_REG_COVER_CLASS
+This is a cover class containing the stack registers. Define this if
+the machine has any stack-like registers.
+@end defmac
+
@defmac FIRST_STACK_REG
The number of the first stack-like register. This one is the top
of the stack.