+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
{
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;
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)
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));