aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-into-ssa.c
diff options
context:
space:
mode:
authorTrevor Saunders <tsaunders@mozilla.com>2013-11-22 05:45:37 +0000
committerTrevor Saunders <tbsaunde@gcc.gnu.org>2013-11-22 05:45:37 +0000
commitef062b13d7ea5c4afe434a90436ce1908ac14442 (patch)
tree15430a70b98350e546a27451e278ea2bc1aec992 /gcc/tree-into-ssa.c
parentd41d612242e589882364ba581c586094599952e3 (diff)
downloadgcc-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-into-ssa.c')
-rw-r--r--gcc/tree-into-ssa.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
index 6cae27e..41c0896 100644
--- a/gcc/tree-into-ssa.c
+++ b/gcc/tree-into-ssa.c
@@ -764,7 +764,6 @@ find_dfsnum_interval (struct dom_dfsnum *defs, unsigned n, unsigned s)
static void
prune_unused_phi_nodes (bitmap phis, bitmap kills, bitmap uses)
{
- vec<int> worklist;
bitmap_iterator bi;
unsigned i, b, p, u, top;
bitmap live_phis;
@@ -836,7 +835,7 @@ prune_unused_phi_nodes (bitmap phis, bitmap kills, bitmap uses)
dfs_out numbers, increase the dfs number by one (so that it corresponds
to the start of the following interval, not to the end of the current
one). We use WORKLIST as a stack. */
- worklist.create (n_defs + 1);
+ auto_vec<int> worklist (n_defs + 1);
worklist.quick_push (1);
top = 1;
n_defs = 1;
@@ -923,7 +922,6 @@ prune_unused_phi_nodes (bitmap phis, bitmap kills, bitmap uses)
}
}
- worklist.release ();
bitmap_copy (phis, live_phis);
BITMAP_FREE (live_phis);
free (defs);
@@ -1084,11 +1082,10 @@ insert_phi_nodes (bitmap_head *dfs)
hash_table <var_info_hasher>::iterator hi;
unsigned i;
var_info_p info;
- vec<var_info_p> vars;
timevar_push (TV_TREE_INSERT_PHI_NODES);
- vars.create (var_infos.elements ());
+ auto_vec<var_info_p> vars (var_infos.elements ());
FOR_EACH_HASH_TABLE_ELEMENT (var_infos, info, var_info_p, hi)
if (info->info.need_phi_state != NEED_PHI_STATE_NO)
vars.quick_push (info);
@@ -1104,8 +1101,6 @@ insert_phi_nodes (bitmap_head *dfs)
BITMAP_FREE (idf);
}
- vars.release ();
-
timevar_pop (TV_TREE_INSERT_PHI_NODES);
}