From patchwork Tue Feb 1 22:48:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Pop X-Patchwork-Id: 81398 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 333EAB70EB for ; Wed, 2 Feb 2011 09:49:13 +1100 (EST) Received: (qmail 28896 invoked by alias); 1 Feb 2011 22:49:11 -0000 Received: (qmail 28887 invoked by uid 22791); 1 Feb 2011 22:49:10 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-gw0-f47.google.com (HELO mail-gw0-f47.google.com) (74.125.83.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Feb 2011 22:49:06 +0000 Received: by gwaa12 with SMTP id a12so3085735gwa.20 for ; Tue, 01 Feb 2011 14:49:04 -0800 (PST) Received: by 10.150.138.2 with SMTP id l2mr1399485ybd.190.1296600544250; Tue, 01 Feb 2011 14:49:04 -0800 (PST) Received: from napoca ([163.181.251.115]) by mx.google.com with ESMTPS id v4sm2976879ybe.5.2011.02.01.14.49.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 01 Feb 2011 14:49:02 -0800 (PST) Received: by napoca (sSMTP sendmail emulation); Tue, 01 Feb 2011 16:49:00 -0600 From: Sebastian Pop To: gcc-patches@gcc.gnu.org Cc: rguenther@suse.de, Sebastian Pop Subject: [PATCH] Fix PR47576 and PR47555: add PARAM_SCEV_MAX_PATH_LENGTH. Date: Tue, 1 Feb 2011 16:48:59 -0600 Message-Id: <1296600539-28196-1-git-send-email-sebpop@gmail.com> In-Reply-To: References: X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, Here is the amended patch. Ok after another round of regstrap? Thanks, Sebastian 2011-02-01 Sebastian Pop 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 + 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 + 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);