2009-02-09 Sebastian Pop <sebastian.pop@amd.com>
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 Feb 2009 20:35:09 +0000 (20:35 +0000)
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 Feb 2009 20:35:09 +0000 (20:35 +0000)
PR middle-end/38953
* graphite.c (if_region_set_false_region): After moving a region
in the false branch of a condition, remove the empty dummy basic block.
(gloog): Remove wrong fix for PR38953.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144042 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/graphite.c

index 267bada..898448a 100644 (file)
@@ -1,3 +1,10 @@
+2009-02-09  Sebastian Pop  <sebastian.pop@amd.com>
+
+       PR middle-end/38953
+       * graphite.c (if_region_set_false_region): After moving a region 
+       in the false branch of a condition, remove the empty dummy basic block.
+       (gloog): Remove wrong fix for PR38953.
+
 2009-02-09  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
        * config/spu/spu.c (array_to_constant): Fix (latent) wrong-code
index a4d5e36..13b9ad6 100644 (file)
@@ -5024,6 +5024,7 @@ if_region_set_false_region (ifsese if_region, sese region)
 {
   basic_block condition = if_region_get_condition_block (if_region);
   edge false_edge = get_false_edge_from_guard_bb (condition);
+  basic_block dummy = false_edge->dest;
   edge entry_region = SESE_ENTRY (region);
   edge exit_region = SESE_EXIT (region);
   basic_block before_region = entry_region->src;
@@ -5038,11 +5039,13 @@ if_region_set_false_region (ifsese if_region, sese region)
   redirect_edge_pred (entry_region, condition);
   redirect_edge_pred (exit_region, before_region);
   redirect_edge_pred (false_edge, last_in_region);
+  redirect_edge_succ (false_edge, single_succ (dummy));
+  delete_basic_block (dummy);
 
   exit_region->flags = EDGE_FALLTHRU;
   recompute_all_dominators ();
 
-  SESE_EXIT (region) = single_succ_edge (false_edge->dest);
+  SESE_EXIT (region) = false_edge;
   if_region->false_region = region;
 
   if (slot)
@@ -5436,16 +5439,6 @@ gloog (scop_p scop, struct clast_stmt *stmt)
   loop_p context_loop;
   ifsese if_region = NULL;
 
-  /* To maintain the loop closed SSA form, we have to keep the phi
-     nodes after the last loop in the scop.  */
-  if (loop_depth (SESE_EXIT (SCOP_REGION (scop))->dest->loop_father)
-      != loop_depth (SESE_EXIT (SCOP_REGION (scop))->src->loop_father))
-    {
-      basic_block bb = SESE_EXIT (SCOP_REGION (scop))->dest;
-      SESE_EXIT (SCOP_REGION (scop)) = split_block_after_labels (bb);
-      pointer_set_insert (SESE_REGION_BBS (SCOP_REGION (scop)), bb);
-    }
-
   recompute_all_dominators ();
   graphite_verify ();
   if_region = move_sese_in_condition (SCOP_REGION (scop));