aboutsummaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2015-11-09 16:45:59 +0100
committerMartin Liska <marxin@gcc.gnu.org>2015-11-09 15:45:59 +0000
commitaf121e828eb03233d731b25b590d1f7c5dd2693d (patch)
treea60b2807573bbeab492c0ef1ec1bb75bcd6b8efa /gcc/ifcvt.c
parentfc402eec4b203f2fba90abd57805174d4101d618 (diff)
downloadgcc-af121e828eb03233d731b25b590d1f7c5dd2693d.zip
gcc-af121e828eb03233d731b25b590d1f7c5dd2693d.tar.gz
gcc-af121e828eb03233d731b25b590d1f7c5dd2693d.tar.bz2
Fix memory leaks and use a pool_allocator
* gcc.c (record_temp_file): Release name string. * ifcvt.c (noce_convert_multiple_sets): Use auto_vec instead of vec. * lra-lives.c (free_live_range_list): Utilize lra_live_range_pool for allocation and deallocation. (create_live_range): Likewise. (copy_live_range): Likewise. (lra_merge_live_ranges): Likewise. (remove_some_program_points_and_update_live_ranges): Likewise. (lra_create_live_ranges_1): Release point_freq_vec that can be not freed from previous iteration of the function. * tree-eh.c (lower_try_finally_switch): Use auto_vec instead of vec. * tree-sra.c (sra_deinitialize): Release all vectors in base_access_vec. * tree-ssa-dom.c (free_dom_edge_info): Make the function extern. * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Release edge_info for a removed edge. (thread_through_all_blocks): Free region vector. * tree-ssa.h (free_dom_edge_info): Declare function extern. From-SVN: r230027
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r--gcc/ifcvt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 59bda5e..c830b3c 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -3101,12 +3101,12 @@ noce_convert_multiple_sets (struct noce_if_info *if_info)
rtx_code cond_code = GET_CODE (cond);
/* The true targets for a conditional move. */
- vec<rtx> targets = vNULL;
+ auto_vec<rtx> targets;
/* The temporaries introduced to allow us to not consider register
overlap. */
- vec<rtx> temporaries = vNULL;
+ auto_vec<rtx> temporaries;
/* The insns we've emitted. */
- vec<rtx_insn *> unmodified_insns = vNULL;
+ auto_vec<rtx_insn *> unmodified_insns;
int count = 0;
FOR_BB_INSNS (then_bb, insn)