Patchwork [18/65] Split rewrite_cross_bb_scalar_deps_out_of_ssa out from rewrite_reductions_out_of_ssa.

login
register
mail settings
Submitter Sebastian Pop
Date Aug. 2, 2010, 8:19 p.m.
Message ID <1280780438-17543-19-git-send-email-sebpop@gmail.com>
Download mbox | patch
Permalink /patch/60616/
State New
Headers show

Comments

Sebastian Pop - Aug. 2, 2010, 8:19 p.m.
From: spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>

2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
	Split out of rewrite_reductions_out_of_ssa.
	* graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
	Declared.
	* graphite.c (graphite_transform_loops): Call it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/graphite@161291 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog               |    8 ++++++++
 gcc/ChangeLog.graphite      |    8 ++++++++
 gcc/graphite-sese-to-poly.c |   11 +++++++++++
 gcc/graphite-sese-to-poly.h |    1 +
 gcc/graphite.c              |    1 +
 5 files changed, 29 insertions(+), 0 deletions(-)

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9980de1..bfdc49a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,13 @@ 
 2010-08-02  Sebastian Pop  <sebastian.pop@amd.com>
 
+	* graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
+	Split out of rewrite_reductions_out_of_ssa.
+	* graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
+	Declared.
+	* graphite.c (graphite_transform_loops): Call it.
+
+2010-08-02  Sebastian Pop  <sebastian.pop@amd.com>
+
 	* graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
 
 2010-08-02  Alexander Monakov  <amonakov@ispras.ru>
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index 166d9f3..0d64cc3 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,5 +1,13 @@ 
 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
 
+	* graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
+	Split out of rewrite_reductions_out_of_ssa.
+	* graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
+	Declared.
+	* graphite.c (graphite_transform_loops): Call it.
+
+2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
+
 	* graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
 
 2010-06-15  Sebastian Pop  <sebastian.pop@amd.com>
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 8baf379..8bcd684 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -2425,6 +2425,17 @@  rewrite_reductions_out_of_ssa (scop_p scop)
 #ifdef ENABLE_CHECKING
   verify_loop_closed_ssa (true);
 #endif
+}
+
+
+/* Rewrite out of SSA all the reduction phi nodes of SCOP.  */
+
+void
+rewrite_cross_bb_scalar_deps_out_of_ssa (scop_p scop)
+{
+  basic_block bb;
+  gimple_stmt_iterator psi;
+  sese region = SCOP_REGION (scop);
 
   FOR_EACH_BB (bb)
     if (bb_in_sese_p (bb, region))
diff --git a/gcc/graphite-sese-to-poly.h b/gcc/graphite-sese-to-poly.h
index 2e0cc08..558a283 100644
--- a/gcc/graphite-sese-to-poly.h
+++ b/gcc/graphite-sese-to-poly.h
@@ -32,6 +32,7 @@  void build_poly_scop (scop_p);
 void check_poly_representation (scop_p);
 void rewrite_commutative_reductions_out_of_ssa (sese, sbitmap);
 void rewrite_reductions_out_of_ssa (scop_p);
+void rewrite_cross_bb_scalar_deps_out_of_ssa (scop_p);
 void build_scop_bbs (scop_p, sbitmap);
 
 #endif
diff --git a/gcc/graphite.c b/gcc/graphite.c
index 5b3b6aa..4bb4344 100644
--- a/gcc/graphite.c
+++ b/gcc/graphite.c
@@ -280,6 +280,7 @@  graphite_transform_loops (void)
     if (dbg_cnt (graphite_scop))
       {
 	rewrite_reductions_out_of_ssa (scop);
+	rewrite_cross_bb_scalar_deps_out_of_ssa (scop);
 	build_scop_bbs (scop, reductions);
       }