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-sccvn.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-sccvn.c')
-rw-r--r-- | gcc/tree-ssa-sccvn.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 1b9514e..925fcf1 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -1751,8 +1751,7 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_) tree base2; HOST_WIDE_INT offset2, size2, maxsize2; int i, j; - vec<vn_reference_op_s> - rhs = vNULL; + auto_vec<vn_reference_op_s> rhs; vn_reference_op_t vro; ao_ref r; @@ -1815,7 +1814,6 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_) vr->operands.truncate (i + 1 + rhs.length ()); FOR_EACH_VEC_ELT (rhs, j, vro) vr->operands[i + 1 + j] = *vro; - rhs.release (); vr->operands = valueize_refs (vr->operands); vr->hashcode = vn_reference_compute_hash (vr); @@ -3787,7 +3785,7 @@ process_scc (vec<tree> scc) static bool extract_and_process_scc_for_name (tree name) { - vec<tree> scc = vNULL; + auto_vec<tree> scc; tree x; /* Found an SCC, pop the components off the SCC stack and @@ -3809,7 +3807,6 @@ extract_and_process_scc_for_name (tree name) "SCC size %u exceeding %u\n", scc.length (), (unsigned)PARAM_VALUE (PARAM_SCCVN_MAX_SCC_SIZE)); - scc.release (); return false; } @@ -3821,8 +3818,6 @@ extract_and_process_scc_for_name (tree name) process_scc (scc); - scc.release (); - return true; } |