From patchwork Mon Aug 2 20:20:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [37/65] Also handle GIMPLE_CALLs in rewrite_cross_bb_scalar_deps. From: Sebastian Pop X-Patchwork-Id: 60633 Message-Id: <1280780438-17543-38-git-send-email-sebpop@gmail.com> To: gcc-patches@gcc.gnu.org Cc: Tobias Grosser , gcc-graphite Date: Mon, 2 Aug 2010 15:20:10 -0500 From: spop 2010-07-15 Sebastian Pop * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_CALL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/graphite@162245 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/ChangeLog.graphite | 5 +++++ gcc/graphite-sese-to-poly.c | 16 +++++++++++++--- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 46b7c59..1272bdb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2010-08-02 Sebastian Pop + * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also + handle GIMPLE_CALL. + +2010-08-02 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/ChangeLog.graphite b/gcc/ChangeLog.graphite index c46bd70..e26a1b3 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 b9bf284..7c47a80 100644 --- a/gcc/graphite-sese-to-poly.c +++ b/gcc/graphite-sese-to-poly.c @@ -2405,10 +2405,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;