summaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authortbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-22 05:45:37 +0000
committertbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-22 05:45:37 +0000
commitc2078b806e007cf378451fcecda0d9f9a366fcc0 (patch)
tree15430a70b98350e546a27451e278ea2bc1aec992 /gcc/tree-vect-loop.c
parenta7920b67d3445222ee084dc2f0552e385027833a (diff)
downloadgcc-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-loop.c')
-rw-r--r--gcc/tree-vect-loop.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 02aa090b51a..bcd351621c9 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -3802,14 +3802,14 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, gimple stmt,
bool extract_scalar_result = false;
gimple use_stmt, orig_stmt, reduction_phi = NULL;
bool nested_in_vect_loop = false;
- vec<gimple> new_phis = vNULL;
- vec<gimple> inner_phis = vNULL;
+ auto_vec<gimple> new_phis;
+ auto_vec<gimple> inner_phis;
enum vect_def_type dt = vect_unknown_def_type;
int j, i;
- vec<tree> scalar_results = vNULL;
+ auto_vec<tree> scalar_results;
unsigned int group_size = 1, k, ratio;
- vec<tree> vec_initial_defs = vNULL;
- vec<gimple> phis;
+ auto_vec<tree> vec_initial_defs;
+ auto_vec<gimple> phis;
bool slp_reduc = false;
tree new_phi_result;
gimple inner_phi = NULL;
@@ -3913,8 +3913,6 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, gimple stmt,
}
}
- vec_initial_defs.release ();
-
/* 2. Create epilog code.
The reduction epilog code operates across the elements of the vector
of partial results computed by the vectorized loop.
@@ -4594,10 +4592,6 @@ vect_finalize_reduction:
phis.release ();
}
-
- scalar_results.release ();
- inner_phis.release ();
- new_phis.release ();
}
@@ -4685,10 +4679,10 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi,
struct loop * def_stmt_loop, *outer_loop = NULL;
tree def_arg;
gimple def_arg_stmt;
- vec<tree> vec_oprnds0 = vNULL;
- vec<tree> vec_oprnds1 = vNULL;
- vec<tree> vect_defs = vNULL;
- vec<gimple> phis = vNULL;
+ auto_vec<tree> vec_oprnds0;
+ auto_vec<tree> vec_oprnds1;
+ auto_vec<tree> vect_defs;
+ auto_vec<gimple> phis;
int vec_num;
tree def0, def1, tem, op0, op1 = NULL_TREE;
@@ -5304,11 +5298,6 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi,
epilog_reduc_code, phis, reduc_index,
double_reduc, slp_node);
- phis.release ();
- vect_defs.release ();
- vec_oprnds0.release ();
- vec_oprnds1.release ();
-
return true;
}