From f37a4f143d14f12cc7bb9a76e10e7a119bc3d61f Mon Sep 17 00:00:00 2001
From: Revital Eres <eres@il.ibm.com>
Date: Mon, 18 Oct 2004 05:31:28 +0000
Subject: Makefile.in (loop-unroll.o): Add VARRAY_H dependency.

2004-10-18  Revital Eres  <eres@il.ibm.com>

        * Makefile.in (loop-unroll.o): Add VARRAY_H dependency.
        * loop-unroll.c: Include varray.h.
        (struct var_to_expand, struct opt_info): Rename split_ivs_info to
        opt_info and expand it to support variable expansion.
        (analyze_insns_in_loop): Rename analyze_ivs_to_split and
        expand it to support variable expansion.
        (pt_info_start_duplication): Rename si_info_start_duplication.
        (apply_opt_in_copies): Rename split_ivs_in_copies and add support
        to the variable expansion optimization.
        (free_opt_info): Rename free_si_info.
        (analyze_insn_to_expand_var, referenced_in_one_insn_in_loop_p,
        expand_var_during_unrolling, insert_var_expansion_initialization,
        combine_var_copies_in_loop_exit, release_var_copies,
        get_expansion): New functions.
        (peel_loop_completely, unroll_loop_constant_iterations,
        unroll_loop_runtime_iterations, peel_loop_simple,
        unroll_loop_stupid): Change uses of struct si_info
        to struct opt_info
        and add uses of fvariable-expansion-in-unroller flag.
        * params.def: Add parameter to restrict the number of expansions.
        * params.h: (MAX_VARIABLE_EXPANSIONS): New define to restrict
        the number of expansions.
        * common.opt: (fvariable-expansion-in-unroller): New flag.
        * doc/invoke.texi: (fvariable-expansion-in-unroller): Document.

From-SVN: r89197
---
 gcc/params.def | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'gcc/params.def')

diff --git a/gcc/params.def b/gcc/params.def
index 845b8d2c51b..79c55bcd2c1 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -95,6 +95,15 @@ DEFPARAM (PARAM_MAX_INLINE_INSNS_RTL,
 	  "The maximum number of instructions for the RTL inliner",
 	  600)
 
+/* Limit the number of expansions created by the variable expansion
+   optimization to avoid register pressure.  */
+DEFPARAM (PARAM_MAX_VARIABLE_EXPANSIONS,
+	  "max-variable-expansions-in-unroller",
+	  "If -fvariable-expansion-in-unroller is used, the maximum number of \
+           times that an individual variable will be expanded \
+           during loop unrolling",
+          1)
+     
 /* The maximum number of instructions to consider when looking for an
    instruction to fill a delay slot.  If more than this arbitrary
    number of instructions is searched, the time savings from filling
-- 
cgit v1.2.1

