diff options
author | tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-22 05:45:37 +0000 |
---|---|---|
committer | tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-22 05:45:37 +0000 |
commit | c2078b806e007cf378451fcecda0d9f9a366fcc0 (patch) | |
tree | 15430a70b98350e546a27451e278ea2bc1aec992 /gcc/tree-vect-stmts.c | |
parent | a7920b67d3445222ee084dc2f0552e385027833a (diff) | |
download | gcc-c2078b806e007cf378451fcecda0d9f9a366fcc0.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205244 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r-- | gcc/tree-vect-stmts.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 2116cec3cf9..1aede48dc77 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -1580,10 +1580,8 @@ vect_get_vec_defs (tree op0, tree op1, gimple stmt, if (slp_node) { int nops = (op1 == NULL_TREE) ? 1 : 2; - vec<tree> ops; - ops.create (nops); - vec<vec<tree> > vec_defs; - vec_defs.create (nops); + auto_vec<tree> ops (nops); + auto_vec<vec<tree> > vec_defs (nops); ops.quick_push (op0); if (op1) @@ -1594,9 +1592,6 @@ vect_get_vec_defs (tree op0, tree op1, gimple stmt, *vec_oprnds0 = vec_defs[0]; if (op1) *vec_oprnds1 = vec_defs[1]; - - ops.release (); - vec_defs.release (); } else { @@ -1907,8 +1902,7 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, if (slp_node) { - vec<vec<tree> > vec_defs; - vec_defs.create (nargs); + auto_vec<vec<tree> > vec_defs (nargs); vec<tree> vec_oprnds0; for (i = 0; i < nargs; i++) @@ -1937,7 +1931,6 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, vec<tree> vec_oprndsi = vec_defs[i]; vec_oprndsi.release (); } - vec_defs.release (); continue; } @@ -2004,8 +1997,7 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, if (slp_node) { - vec<vec<tree> > vec_defs; - vec_defs.create (nargs); + auto_vec<vec<tree> > vec_defs (nargs); vec<tree> vec_oprnds0; for (i = 0; i < nargs; i++) @@ -2036,7 +2028,6 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, vec<tree> vec_oprndsi = vec_defs[i]; vec_oprndsi.release (); } - vec_defs.release (); continue; } |