From patchwork Fri Jul 16 07:03:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Pop X-Patchwork-Id: 59072 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 4EC98B6F19 for ; Fri, 16 Jul 2010 17:05:00 +1000 (EST) Received: (qmail 332 invoked by alias); 16 Jul 2010 07:04:37 -0000 Received: (qmail 32662 invoked by uid 22791); 16 Jul 2010 07:04:36 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, TW_TM, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-gy0-f175.google.com (HELO mail-gy0-f175.google.com) (209.85.160.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Jul 2010 07:04:32 +0000 Received: by gya6 with SMTP id 6so1239186gya.20 for ; Fri, 16 Jul 2010 00:04:30 -0700 (PDT) Received: by 10.101.152.22 with SMTP id e22mr774944ano.215.1279263869842; Fri, 16 Jul 2010 00:04:29 -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 k11sm21474404ani.30.2010.07.16.00.04.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 16 Jul 2010 00:04:29 -0700 (PDT) Received: by napoca (sSMTP sendmail emulation); Fri, 16 Jul 2010 02:04:26 -0500 From: Sebastian Pop To: gcc-patches@gcc.gnu.org Cc: gcc-graphite@googlegroups.com, Sebastian Pop Subject: [PATCH 04/12] Also handle GIMPLE_CALLs in rewrite_cross_bb_scalar_deps. Date: Fri, 16 Jul 2010 02:03:55 -0500 Message-Id: <1279263843-9149-5-git-send-email-sebpop@gmail.com> In-Reply-To: <1279263843-9149-1-git-send-email-sebpop@gmail.com> References: <1279263843-9149-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-15 Sebastian Pop * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_CALL. --- gcc/ChangeLog.graphite | 5 +++++ gcc/graphite-sese-to-poly.c | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite index e6daa32..a83cc99 100644 --- a/gcc/ChangeLog.graphite +++ b/gcc/ChangeLog.graphite @@ -1,5 +1,10 @@ 2010-07-15 Sebastian Pop + * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also + handle GIMPLE_CALL. + +2010-07-15 Sebastian Pop + * tree-chrec.c (chrec_apply): Should only apply to the specified variable. Also handle multivariate chains of recurrences that satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT. diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c index 6e09532..22f9536 100644 --- a/gcc/graphite-sese-to-poly.c +++ b/gcc/graphite-sese-to-poly.c @@ -2404,10 +2404,20 @@ rewrite_cross_bb_scalar_deps (sese region, gimple_stmt_iterator *gsi) tree zero_dim_array = NULL_TREE; gimple use_stmt; - if (gimple_code (stmt) != GIMPLE_ASSIGN) - return; + switch (gimple_code (stmt)) + { + case GIMPLE_ASSIGN: + def = gimple_assign_lhs (stmt); + break; + + case GIMPLE_CALL: + def = gimple_call_lhs (stmt); + break; + + default: + return; + } - def = gimple_assign_lhs (stmt); if (!is_gimple_reg (def) || scev_analyzable_p (def, region)) return;