summaryrefslogtreecommitdiff
path: root/gcc/gimple-ssa-strength-reduction.c
diff options
context:
space:
mode:
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-11 11:21:44 +0000
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-11 11:21:44 +0000
commitd8b14292088c518e6ea750c2c27da2125de220ca (patch)
tree276c81537cf38e77f5739edf73cfe3a5bcddd2d0 /gcc/gimple-ssa-strength-reduction.c
parent0c4d7986824dd84fbc0b3128a41b61647f33e80a (diff)
downloadgcc-d8b14292088c518e6ea750c2c27da2125de220ca.tar.gz
Fix various memory leaks
* gimple-ssa-strength-reduction.c (create_phi_basis): Use auto_vec. * passes.c (release_dump_file_name): New function. (pass_init_dump_file): Used from this function. (pass_fini_dump_file): Likewise. * tree-sra.c (convert_callers_for_node): Use xstrdup_for_dump. * var-tracking.c (vt_initialize): Use pool_allocator. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230152 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple-ssa-strength-reduction.c')
-rw-r--r--gcc/gimple-ssa-strength-reduction.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c
index ce32ad33e94..b8078230f34 100644
--- a/gcc/gimple-ssa-strength-reduction.c
+++ b/gcc/gimple-ssa-strength-reduction.c
@@ -2226,12 +2226,11 @@ create_phi_basis (slsr_cand_t c, gimple *from_phi, tree basis_name,
int i;
tree name, phi_arg;
gphi *phi;
- vec<tree> phi_args;
slsr_cand_t basis = lookup_cand (c->basis);
int nargs = gimple_phi_num_args (from_phi);
basic_block phi_bb = gimple_bb (from_phi);
slsr_cand_t phi_cand = base_cand_from_table (gimple_phi_result (from_phi));
- phi_args.create (nargs);
+ auto_vec<tree> phi_args (nargs);
/* Process each argument of the existing phi that represents
conditionally-executed add candidates. */