aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2009-11-25 05:08:09 +0000
committerSebastian Pop <spop@gcc.gnu.org>2009-11-25 05:08:09 +0000
commit6c4499b675cc797b0f5efe294340263c2f45e35e (patch)
treeaafc699046fd250f591bab01983ea039e8fb7d09
parent8e49fe911a3c6bd2509dd002249175a286f84436 (diff)
downloadgcc-6c4499b675cc797b0f5efe294340263c2f45e35e.zip
gcc-6c4499b675cc797b0f5efe294340263c2f45e35e.tar.gz
gcc-6c4499b675cc797b0f5efe294340263c2f45e35e.tar.bz2
re PR middle-end/41193 (slow compilation with graphite / ice with graphite)
2009-10-15 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge. (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts, and check the SSA representation. * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193. From-SVN: r154590
-rw-r--r--gcc/ChangeLog.graphite8
-rw-r--r--gcc/graphite-sese-to-poly.c12
2 files changed, 16 insertions, 4 deletions
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index fd86beb..3a0779c 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,5 +1,13 @@
2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
+ * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
+ (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
+ and check the SSA representation.
+
+ * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
+
+2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
+
* gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 014557f..507ab24 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -2591,13 +2591,10 @@ insert_copyin (tree red, gimple loop_phi)
{
gimple_seq stmts;
tree init = initial_value_for_loop_phi (loop_phi);
- edge e = edge_initial_value_for_loop_phi (loop_phi);
- basic_block bb = e->src;
- gimple_stmt_iterator insert_gsi = gsi_last_bb (bb);
tree expr = build2 (MODIFY_EXPR, TREE_TYPE (init), red, init);
force_gimple_operand (expr, &stmts, true, NULL);
- gsi_insert_seq_before (&insert_gsi, stmts, GSI_SAME_STMT);
+ gsi_insert_seq_on_edge (edge_initial_value_for_loop_phi (loop_phi), stmts);
}
/* Rewrite out of SSA the reduction described by the loop phi nodes
@@ -2697,6 +2694,13 @@ rewrite_commutative_reductions_out_of_ssa (sese region, sbitmap reductions)
FOR_EACH_LOOP (li, loop, 0)
if (loop_in_sese_p (loop, region))
rewrite_commutative_reductions_out_of_ssa_loop (loop, reductions);
+
+ gsi_commit_edge_inserts ();
+ update_ssa (TODO_update_ssa);
+#ifdef ENABLE_CHECKING
+ verify_ssa (false);
+ verify_loop_closed_ssa ();
+#endif
}
/* Builds the polyhedral representation for a SESE region. */