Patchwork [1/3] Move rewrite_commutative_reductions_out_of_ssa before find_scop_parameters.

login
register
mail settings
Submitter Sebastian Pop
Date Jan. 20, 2011, 12:19 a.m.
Message ID <1295482796-29304-2-git-send-email-sebpop@gmail.com>
Download mbox | patch
Permalink /patch/79627/
State New
Headers show

Comments

Sebastian Pop - Jan. 20, 2011, 12:19 a.m.
2011-01-19  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (build_poly_scop): Move
	rewrite_commutative_reductions_out_of_ssa before
	find_scop_parameters.
---
 gcc/ChangeLog.graphite      |    6 ++++++
 gcc/graphite-sese-to-poly.c |    5 +++--
 2 files changed, 9 insertions(+), 2 deletions(-)

Patch

diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index ed3e4ab..45e945c 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,3 +1,9 @@ 
+2011-01-19  Sebastian Pop  <sebastian.pop@amd.com>
+
+	* graphite-sese-to-poly.c (build_poly_scop): Move
+	rewrite_commutative_reductions_out_of_ssa before
+	find_scop_parameters.
+
 2011-01-18  Sebastian Pop  <sebastian.pop@amd.com>
 
 	PR tree-optimization/46970
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 12b93b0..9184065 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -3159,6 +3159,9 @@  build_poly_scop (scop_p scop)
   if (!scop_ivs_can_be_represented (scop))
     return;
 
+  if (flag_associative_math)
+    rewrite_commutative_reductions_out_of_ssa (scop);
+
   build_sese_loop_nests (region);
   build_sese_conditions (region);
   find_scop_parameters (scop);
@@ -3175,8 +3178,6 @@  build_poly_scop (scop_p scop)
      representation to the polyhedral representation to avoid scev
      analysis failures.  That means that these functions will insert
      new data references that they create in the right place.  */
-  if (flag_associative_math)
-    rewrite_commutative_reductions_out_of_ssa (scop);
   rewrite_reductions_out_of_ssa (scop);
   rewrite_cross_bb_scalar_deps_out_of_ssa (scop);