This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 04/12] Also handle GIMPLE_CALLs in rewrite_cross_bb_scalar_deps.


2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>

	* 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  <sebastian.pop@amd.com>
 
+	* graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
+	handle GIMPLE_CALL.
+
+2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
+
 	* 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;
-- 
1.7.0.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]