From patchwork Fri Jul 23 05:48:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Pop X-Patchwork-Id: 59733 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 4F6631007D2 for ; Fri, 23 Jul 2010 15:48:59 +1000 (EST) Received: (qmail 30626 invoked by alias); 23 Jul 2010 05:48:57 -0000 Received: (qmail 30616 invoked by uid 22791); 23 Jul 2010 05:48:55 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-gx0-f175.google.com (HELO mail-gx0-f175.google.com) (209.85.161.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Jul 2010 05:48:51 +0000 Received: by mail-gx0-f175.google.com with SMTP id 2so651663gxk.20 for ; Thu, 22 Jul 2010 22:48:51 -0700 (PDT) Received: by 10.151.94.33 with SMTP id w33mr5392265ybl.374.1279864131218; Thu, 22 Jul 2010 22:48:51 -0700 (PDT) Received: from napoca (cpe-70-120-196-107.austin.res.rr.com [70.120.196.107]) by mx.google.com with ESMTPS id q21sm2395643ybk.23.2010.07.22.22.48.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 22 Jul 2010 22:48:50 -0700 (PDT) Received: by napoca (sSMTP sendmail emulation); Fri, 23 Jul 2010 00:48:43 -0500 From: Sebastian Pop To: gcc-patches@gcc.gnu.org Cc: gcc-graphite@googlegroups.com, Sebastian Pop Subject: [PATCH 1/3] Do not instantiate default definitions in instantiate_scev_name. Date: Fri, 23 Jul 2010 00:48:16 -0500 Message-Id: <1279864098-1408-2-git-send-email-sebpop@gmail.com> In-Reply-To: <1279864098-1408-1-git-send-email-sebpop@gmail.com> References: <1279864098-1408-1-git-send-email-sebpop@gmail.com> 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 2010-07-22 Sebastian Pop * tree-scalar-evolution.c (instantiate_scev_name): Do not instantiate default definitions. --- gcc/ChangeLog.graphite | 5 +++++ gcc/tree-scalar-evolution.c | 13 ++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite index 38708d5..e656c32 100644 --- a/gcc/ChangeLog.graphite +++ b/gcc/ChangeLog.graphite @@ -1,3 +1,8 @@ +2010-07-22 Sebastian Pop + + * tree-scalar-evolution.c (instantiate_scev_name): Do not + instantiate default definitions. + 2010-07-20 Vladimir Kargov * graphite-scop-detection.c (is_valid_stmt_p): New. diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c index 91516f1..5b6ce7b 100644 --- a/gcc/tree-scalar-evolution.c +++ b/gcc/tree-scalar-evolution.c @@ -2161,11 +2161,15 @@ instantiate_scev_name (basic_block instantiate_below, result again. */ res = analyze_scalar_evolution (def_loop, chrec); - /* Don't instantiate loop-closed-ssa phi nodes. */ + /* Don't instantiate default definitions. */ if (TREE_CODE (res) == SSA_NAME - && (loop_containing_stmt (SSA_NAME_DEF_STMT (res)) == NULL - || (loop_depth (loop_containing_stmt (SSA_NAME_DEF_STMT (res))) - > loop_depth (def_loop)))) + && SSA_NAME_IS_DEFAULT_DEF (res)) + ; + + /* Don't instantiate loop-closed-ssa phi nodes. */ + else if (TREE_CODE (res) == SSA_NAME + && loop_depth (loop_containing_stmt (SSA_NAME_DEF_STMT (res))) + > loop_depth (def_loop)) { if (res == chrec) res = loop_closed_phi_def (chrec); @@ -2195,7 +2199,6 @@ instantiate_scev_name (basic_block instantiate_below, /* Store the correct value to the cache. */ set_instantiated_value (cache, instantiate_below, chrec, res); return res; - } /* Analyze all the parameters of the chrec, between INSTANTIATE_BELOW