Fix PR47576 and PR47555: add PARAM_SCEV_MAX_EXPR_COMPLEXITY.
authorSebastian Pop <sebastian.pop@amd.com>
Wed, 2 Feb 2011 15:52:08 +0000 (15:52 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Wed, 2 Feb 2011 15:52:08 +0000 (15:52 +0000)
2011-02-02  Sebastian Pop  <sebastian.pop@amd.com>

PR tree-optimization/47576
PR tree-optimization/47555
* doc/invoke.texi (scev-max-expr-complexity): Documented.
* params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
(PARAM_SCEV_MAX_EXPR_COMPLEXITY): Declared.
* tree-scalar-evolution.c (follow_ssa_edge): Use
PARAM_SCEV_MAX_EXPR_COMPLEXITY.

From-SVN: r169530

gcc/ChangeLog
gcc/doc/invoke.texi
gcc/params.def
gcc/tree-scalar-evolution.c

index 2af2c32edd65891f1140dea9dc609ab80451799f..cbe95a0034d36c2201220645c7b2b4df824a7b52 100644 (file)
@@ -1,3 +1,13 @@
+2011-02-02  Sebastian Pop  <sebastian.pop@amd.com>
+
+       PR tree-optimization/47576
+       PR tree-optimization/47555
+       * doc/invoke.texi (scev-max-expr-complexity): Documented.
+       * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
+       (PARAM_SCEV_MAX_EXPR_COMPLEXITY): Declared.
+       * tree-scalar-evolution.c (follow_ssa_edge): Use
+       PARAM_SCEV_MAX_EXPR_COMPLEXITY.
+
 2011-02-02  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/47566
index b25d8cf482697f61d1069f284d07de913d306378..da226dc0c764054ffec8e4c677e9d9afbd97e8c9 100644 (file)
@@ -8463,6 +8463,10 @@ optimization when a new iv is added to the set.
 Bound on size of expressions used in the scalar evolutions analyzer.
 Large expressions slow the analyzer.
 
+@item scev-max-expr-complexity
+Bound on the complexity of the expressions in the scalar evolutions analyzer.
+Complex expressions slow the analyzer.
+
 @item omega-max-vars
 The maximum number of variables in an Omega constraint system.
 The default value is 128.
index 3138bc22cd72a51038d81dc735fdb1baf902e2eb..5749eb2e5f34bc1ba2126a3b2889963fee321d22 100644 (file)
@@ -481,7 +481,12 @@ DEFPARAM(PARAM_IV_ALWAYS_PRUNE_CAND_SET_BOUND,
 DEFPARAM(PARAM_SCEV_MAX_EXPR_SIZE,
         "scev-max-expr-size",
         "Bound on size of expressions used in the scalar evolutions analyzer",
-        20, 0, 0)
+        100, 0, 0)
+
+DEFPARAM(PARAM_SCEV_MAX_EXPR_COMPLEXITY,
+        "scev-max-expr-complexity",
+        "Bound on the complexity of the expressions in the scalar evolutions analyzer",
+        10, 0, 0)
 
 DEFPARAM(PARAM_OMEGA_MAX_VARS,
         "omega-max-vars",
index d60e56915c3fbfe9255bb1f5535cba0bfec340e9..1b68b36b30b249fb18699228b32582092452b9cf 100644 (file)
@@ -1399,7 +1399,7 @@ follow_ssa_edge (struct loop *loop, gimple def, gimple halting_phi,
     return t_false;
 
   /* Give up if the path is longer than the MAX that we allow.  */
-  if (limit > PARAM_VALUE (PARAM_SCEV_MAX_EXPR_SIZE))
+  if (limit > PARAM_VALUE (PARAM_SCEV_MAX_EXPR_COMPLEXITY))
     return t_dont_know;
 
   def_loop = loop_containing_stmt (def);