From patchwork Tue Jan 18 05:38:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Pop X-Patchwork-Id: 79252 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 C9445B7139 for ; Tue, 18 Jan 2011 16:38:51 +1100 (EST) Received: (qmail 19614 invoked by alias); 18 Jan 2011 05:38:31 -0000 Received: (qmail 19451 invoked by uid 22791); 18 Jan 2011 05:38:29 -0000 X-SWARE-Spam-Status: No, hits=-2.6 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-yx0-f175.google.com (HELO mail-yx0-f175.google.com) (209.85.213.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 18 Jan 2011 05:38:23 +0000 Received: by yxd5 with SMTP id 5so2315955yxd.20 for ; Mon, 17 Jan 2011 21:38:21 -0800 (PST) Received: by 10.90.100.4 with SMTP id x4mr5631911agb.4.1295329101523; Mon, 17 Jan 2011 21:38:21 -0800 (PST) Received: from napoca (adsl-99-184-93-67.dsl.austtx.sbcglobal.net [99.184.93.67]) by mx.google.com with ESMTPS id u3sm2702785yba.4.2011.01.17.21.38.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 17 Jan 2011 21:38:21 -0800 (PST) Received: by napoca (sSMTP sendmail emulation); Mon, 17 Jan 2011 23:38:18 -0600 From: Sebastian Pop To: gcc-patches@gcc.gnu.org Cc: rguenther@suse.de, gcc-graphite@googlegroups.com, Sebastian Pop Subject: [PATCH 4/5] Do not create the temporary array for reductions into VAR_DECLs. Date: Mon, 17 Jan 2011 23:38:02 -0600 Message-Id: <1295329083-27160-5-git-send-email-sebpop@gmail.com> In-Reply-To: <1295329083-27160-1-git-send-email-sebpop@gmail.com> References: <1295329083-27160-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 2011-01-17 Sebastian Pop * graphite-sese-to-poly.c (close_phi_written_to_memory): Also allow VAR_DECLs. * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed. --- gcc/ChangeLog.graphite | 7 +++++++ gcc/graphite-sese-to-poly.c | 3 ++- .../gfortran.dg/graphite/interchange-3.f90 | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite index 0167f22..b222d37 100644 --- a/gcc/ChangeLog.graphite +++ b/gcc/ChangeLog.graphite @@ -1,5 +1,12 @@ 2011-01-17 Sebastian Pop + * graphite-sese-to-poly.c (close_phi_written_to_memory): Also allow + VAR_DECLs. + + * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed. + +2011-01-17 Sebastian Pop + * graphite-dependences.c (reduction_dr_1): Allow several reductions in a reduction PBB. * graphite-sese-to-poly.c (split_reduction_stmt): Do not split PBBs diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c index c578025..dd8f9f3 100644 --- a/gcc/graphite-sese-to-poly.c +++ b/gcc/graphite-sese-to-poly.c @@ -2968,7 +2968,8 @@ close_phi_written_to_memory (gimple close_phi) && gimple_code (stmt) == GIMPLE_ASSIGN && (res = gimple_assign_lhs (stmt)) && (TREE_CODE (res) == ARRAY_REF - || TREE_CODE (res) == MEM_REF)) + || TREE_CODE (res) == MEM_REF + || TREE_CODE (res) == VAR_DECL)) return res; return NULL_TREE; diff --git a/gcc/testsuite/gfortran.dg/graphite/interchange-3.f90 b/gcc/testsuite/gfortran.dg/graphite/interchange-3.f90 index 04f4a13..06da2b3 100644 --- a/gcc/testsuite/gfortran.dg/graphite/interchange-3.f90 +++ b/gcc/testsuite/gfortran.dg/graphite/interchange-3.f90 @@ -24,5 +24,5 @@ Program FOO end Program FOO -! { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } +! { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } ! { dg-final { cleanup-tree-dump "graphite" } }