bool free_region_copy = false, copying_header = false;
class loop *loop = entry->dest->loop_father;
edge exit_copy;
- vec<basic_block> doms = vNULL;
edge redirected;
profile_count total_count = profile_count::uninitialized ();
profile_count entry_count = profile_count::uninitialized ();
/* Record blocks outside the region that are dominated by something
inside. */
+ auto_vec<basic_block> doms;
if (update_dominance)
{
- doms.create (0);
doms = get_dominated_by_region (CDI_DOMINATORS, region, n_region);
}
set_immediate_dominator (CDI_DOMINATORS, entry->dest, entry->src);
doms.safe_push (get_bb_original (entry->dest));
iterate_fix_dominators (CDI_DOMINATORS, doms, false);
- doms.release ();
}
/* Add the other PHI node arguments. */
class loop *loop = exit->dest->loop_father;
class loop *orig_loop = entry->dest->loop_father;
basic_block switch_bb, entry_bb, nentry_bb;
- vec<basic_block> doms;
profile_count total_count = profile_count::uninitialized (),
exit_count = profile_count::uninitialized ();
edge exits[2], nexits[2], e;
/* Record blocks outside the region that are dominated by something
inside. */
- doms = get_dominated_by_region (CDI_DOMINATORS, region, n_region);
+ auto_vec<basic_block> doms = get_dominated_by_region (CDI_DOMINATORS, region,
+ n_region);
total_count = exit->src->count;
exit_count = exit->count ();
/* Anything that is outside of the region, but was dominated by something
inside needs to update dominance info. */
iterate_fix_dominators (CDI_DOMINATORS, doms, false);
- doms.release ();
/* Update the SSA web. */
update_ssa (TODO_update_ssa);
move_sese_region_to_fn (struct function *dest_cfun, basic_block entry_bb,
basic_block exit_bb, tree orig_block)
{
- vec<basic_block> bbs, dom_bbs;
+ vec<basic_block> bbs;
basic_block dom_entry = get_immediate_dominator (CDI_DOMINATORS, entry_bb);
basic_block after, bb, *entry_pred, *exit_succ, abb;
struct function *saved_cfun = cfun;
/* The blocks that used to be dominated by something in BBS will now be
dominated by the new block. */
- dom_bbs = get_dominated_by_region (CDI_DOMINATORS,
- bbs.address (),
- bbs.length ());
+ auto_vec<basic_block> dom_bbs = get_dominated_by_region (CDI_DOMINATORS,
+ bbs.address (),
+ bbs.length ());
/* Detach ENTRY_BB and EXIT_BB from CFUN->CFG. We need to remember
the predecessor edges to ENTRY_BB and the successor edges to
set_immediate_dominator (CDI_DOMINATORS, bb, dom_entry);
FOR_EACH_VEC_ELT (dom_bbs, i, abb)
set_immediate_dominator (CDI_DOMINATORS, abb, bb);
- dom_bbs.release ();
if (exit_bb)
{