diff options
author | Trevor Saunders <tbsaunde+gcc@tbsaunde.org> | 2016-07-13 02:44:52 +0000 |
---|---|---|
committer | Trevor Saunders <tbsaunde@gcc.gnu.org> | 2016-07-13 02:44:52 +0000 |
commit | 8c6812476a028328a11c68079d1714c9f81b6279 (patch) | |
tree | b23b2bc969495367f8ea5f18416b898c1494be56 /gcc/genmatch.c | |
parent | fcd215916e0991815853999267824defe1963379 (diff) | |
download | gcc-8c6812476a028328a11c68079d1714c9f81b6279.zip gcc-8c6812476a028328a11c68079d1714c9f81b6279.tar.gz gcc-8c6812476a028328a11c68079d1714c9f81b6279.tar.bz2 |
use auto_vec for more local variables
gcc/c/ChangeLog:
2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* c-parser.c (c_parser_generic_selection): Make type of variable
auto_vec.
(c_parser_omp_declare_simd): Likewise.
gcc/ChangeLog:
2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* cfgexpand.c (expand_used_vars): Make the type of a local variable auto_vec.
* genmatch.c (lower_for): Likewise.
* haifa-sched.c (haifa_sched_init): Likewise.
(add_to_speculative_block): Likewise.
(create_check_block_twin): Likewise.
* predict.c (handle_missing_profiles): Likewise.
* tree-data-ref.c (loop_nest_has_data_refs): Likewise.
* tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Likewise.
* tree-ssa-loop-niter.c (discover_iteration_bound_by_body_walk): Likewise.
(maybe_lower_iteration_bound): Likewise.
* tree-ssa-sccvn.c (DFS): Likewise.
* tree-stdarg.c (reachable_at_most_once): Likewise.
* tree-vect-stmts.c (vectorizable_conversion): Likewise.
(vectorizable_store): Likewise.
From-SVN: r238285
Diffstat (limited to 'gcc/genmatch.c')
-rw-r--r-- | gcc/genmatch.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/genmatch.c b/gcc/genmatch.c index f5aa29b..02e945a 100644 --- a/gcc/genmatch.c +++ b/gcc/genmatch.c @@ -1416,8 +1416,7 @@ lower_for (simplify *sin, vec<simplify *>& simplifiers) { operand *match_op = s->match; operand *result_op = s->result; - vec<std::pair<user_id *, id_base *> > subst; - subst.create (n_ids); + auto_vec<std::pair<user_id *, id_base *> > subst (n_ids); bool skip = false; for (unsigned i = 0; i < n_ids; ++i) { @@ -1437,18 +1436,15 @@ lower_for (simplify *sin, vec<simplify *>& simplifiers) result_op = replace_id (result_op, id, oper); } if (skip) - { - subst.release (); - continue; - } + continue; + simplify *ns = new simplify (s->kind, match_op, result_op, vNULL, s->capture_ids); ns->for_subst_vec.safe_splice (s->for_subst_vec); if (result_op && can_delay_subst) ns->for_subst_vec.safe_splice (subst); - else - subst.release (); + worklist.safe_push (ns); } } |