diff options
author | Trevor Saunders <tsaunders@mozilla.com> | 2013-11-22 05:45:37 +0000 |
---|---|---|
committer | Trevor Saunders <tbsaunde@gcc.gnu.org> | 2013-11-22 05:45:37 +0000 |
commit | ef062b13d7ea5c4afe434a90436ce1908ac14442 (patch) | |
tree | 15430a70b98350e546a27451e278ea2bc1aec992 /gcc/tree-ssa-loop-manip.c | |
parent | d41d612242e589882364ba581c586094599952e3 (diff) | |
download | gcc-ef062b13d7ea5c4afe434a90436ce1908ac14442.zip gcc-ef062b13d7ea5c4afe434a90436ce1908ac14442.tar.gz gcc-ef062b13d7ea5c4afe434a90436ce1908ac14442.tar.bz2 |
add auto_vec
2013-11-22 Trevor Saunders <tsaunders@mozilla.com>
gcc/
* vec.h (auto_vec): New class.
* cfganal.c, cfgloop.c, cgraphunit.c, config/i386/i386.c, dwarf2out.c,
function.c, genautomata.c, gimple.c, haifa-sched.c, ipa-inline.c,
ira-build.c, loop-unroll.c, omp-low.c, ree.c, trans-mem.c,
tree-call-cdce.c, tree-eh.c, tree-if-conv.c, tree-into-ssa.c,
tree-loop-distribution.c, tree-predcom.c, tree-sra.c,
tree-sssa-forwprop.c, tree-ssa-loop-manip.c, tree-ssa-pre.c,
tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-structalias.c,
tree-vect-loop.c, tree-vect-stmts.c: Use auto_vec and stack_vec as
appropriate instead of vec for local variables.
cp/
* parser.c, semantics.c: Change some local variables from vec to
auto_vec or stack_vec.
From-SVN: r205244
Diffstat (limited to 'gcc/tree-ssa-loop-manip.c')
-rw-r--r-- | gcc/tree-ssa-loop-manip.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c index 6729167..031b7c7 100644 --- a/gcc/tree-ssa-loop-manip.c +++ b/gcc/tree-ssa-loop-manip.c @@ -187,7 +187,6 @@ compute_live_loop_exits (bitmap live_exits, bitmap use_blocks, { unsigned i; bitmap_iterator bi; - vec<basic_block> worklist; struct loop *def_loop = def_bb->loop_father; unsigned def_loop_depth = loop_depth (def_loop); bitmap def_loop_exits; @@ -195,7 +194,7 @@ compute_live_loop_exits (bitmap live_exits, bitmap use_blocks, /* Normally the work list size is bounded by the number of basic blocks in the largest loop. We don't know this number, but we can be fairly sure that it will be relatively small. */ - worklist.create (MAX (8, n_basic_blocks_for_fn (cfun) / 128)); + auto_vec<basic_block> worklist (MAX (8, n_basic_blocks_for_fn (cfun) / 128)); EXECUTE_IF_SET_IN_BITMAP (use_blocks, 0, i, bi) { @@ -258,7 +257,6 @@ compute_live_loop_exits (bitmap live_exits, bitmap use_blocks, worklist.quick_push (pred); } } - worklist.release (); def_loop_exits = BITMAP_ALLOC (&loop_renamer_obstack); for (struct loop *loop = def_loop; @@ -1046,7 +1044,7 @@ tree_transform_and_unroll_loop (struct loop *loop, unsigned factor, unsigned new_est_niter, i, prob; unsigned irr = loop_preheader_edge (loop)->flags & EDGE_IRREDUCIBLE_LOOP; sbitmap wont_exit; - vec<edge> to_remove = vNULL; + auto_vec<edge> to_remove; est_niter = expected_loop_iterations (loop); determine_exit_conditions (loop, desc, factor, @@ -1194,7 +1192,6 @@ tree_transform_and_unroll_loop (struct loop *loop, unsigned factor, ok = remove_path (e); gcc_assert (ok); } - to_remove.release (); update_ssa (TODO_update_ssa); /* Ensure that the frequencies in the loop match the new estimated |