diff mbox

Fix PR47576 and PR47555: add PARAM_SCEV_MAX_PATH_LENGTH.

Message ID 1296600539-28196-1-git-send-email-sebpop@gmail.com
State New
Headers show

Commit Message

Sebastian Pop Feb. 1, 2011, 10:48 p.m. UTC
Hi,

Here is the amended patch.  Ok after another round of regstrap?

Thanks,
Sebastian

2011-02-01  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.
---
 gcc/ChangeLog               |   10 ++++++++++
 gcc/doc/invoke.texi         |    4 ++++
 gcc/params.def              |    7 ++++++-
 gcc/tree-scalar-evolution.c |    2 +-
 4 files changed, 21 insertions(+), 2 deletions(-)

Comments

Richard Biener Feb. 1, 2011, 10:57 p.m. UTC | #1
On Tue, Feb 1, 2011 at 11:48 PM, Sebastian Pop <sebpop@gmail.com> wrote:
> Hi,
>
> Here is the amended patch.  Ok after another round of regstrap?

Ok.

Thanks,
Richard.

> Thanks,
> Sebastian
>
> 2011-02-01  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.
> ---
>  gcc/ChangeLog               |   10 ++++++++++
>  gcc/doc/invoke.texi         |    4 ++++
>  gcc/params.def              |    7 ++++++-
>  gcc/tree-scalar-evolution.c |    2 +-
>  4 files changed, 21 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> index e5c4b37..d832112 100644
> --- a/gcc/ChangeLog
> +++ b/gcc/ChangeLog
> @@ -1,5 +1,15 @@
>  2011-02-01  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-01  Sebastian Pop  <sebastian.pop@amd.com>
> +
>        PR tree-optimization/47561
>        * toplev.c (process_options): Print the Graphite flags.  Add
>        flag_loop_flatten to the list of options requiring Graphite.
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index b25d8cf..da226dc 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -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.
> diff --git a/gcc/params.def b/gcc/params.def
> index 3138bc2..5749eb2 100644
> --- a/gcc/params.def
> +++ b/gcc/params.def
> @@ -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",
> diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c
> index d60e569..1b68b36 100644
> --- a/gcc/tree-scalar-evolution.c
> +++ b/gcc/tree-scalar-evolution.c
> @@ -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);
> --
> 1.7.1
>
>
diff mbox

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e5c4b37..d832112 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,15 @@ 
 2011-02-01  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-01  Sebastian Pop  <sebastian.pop@amd.com>
+
 	PR tree-optimization/47561
 	* toplev.c (process_options): Print the Graphite flags.  Add
 	flag_loop_flatten to the list of options requiring Graphite.
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index b25d8cf..da226dc 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -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.
diff --git a/gcc/params.def b/gcc/params.def
index 3138bc2..5749eb2 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -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",
diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c
index d60e569..1b68b36 100644
--- a/gcc/tree-scalar-evolution.c
+++ b/gcc/tree-scalar-evolution.c
@@ -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);