From c2078b806e007cf378451fcecda0d9f9a366fcc0 Mon Sep 17 00:00:00 2001 From: tbsaunde Date: Fri, 22 Nov 2013 05:45:37 +0000 Subject: add auto_vec 2013-11-22 Trevor Saunders 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205244 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-predcom.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'gcc/tree-predcom.c') diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c index 6d141842f1c..0d3c66cc877 100644 --- a/gcc/tree-predcom.c +++ b/gcc/tree-predcom.c @@ -1538,7 +1538,7 @@ initialize_root_vars_lm (struct loop *loop, dref root, bool written, static void execute_load_motion (struct loop *loop, chain_p chain, bitmap tmp_vars) { - vec vars; + auto_vec vars; dref a; unsigned n_writes = 0, ridx, i; tree var; @@ -1577,8 +1577,6 @@ execute_load_motion (struct loop *loop, chain_p chain, bitmap tmp_vars) replace_ref_with (a->stmt, vars[ridx], !is_read, !is_read); } - - vars.release (); } /* Returns the single statement in that NAME is used, excepting @@ -2272,7 +2270,7 @@ try_combine_chains (vec *chains) { unsigned i, j; chain_p ch1, ch2, cch; - vec worklist = vNULL; + auto_vec worklist; FOR_EACH_VEC_ELT (*chains, i, ch1) if (chain_can_be_combined_p (ch1)) @@ -2298,8 +2296,6 @@ try_combine_chains (vec *chains) } } } - - worklist.release (); } /* Prepare initializers for CHAIN in LOOP. Returns false if this is -- cgit v1.2.1