Fix memory leaks and use a pool_allocator
authorMartin Liska <mliska@suse.cz>
Mon, 9 Nov 2015 15:45:59 +0000 (16:45 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Mon, 9 Nov 2015 15:45:59 +0000 (15:45 +0000)
commitaf121e828eb03233d731b25b590d1f7c5dd2693d
treea60b2807573bbeab492c0ef1ec1bb75bcd6b8efa
parentfc402eec4b203f2fba90abd57805174d4101d618
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
gcc/ChangeLog
gcc/gcc.c
gcc/ifcvt.c
gcc/lra-lives.c
gcc/tree-eh.c
gcc/tree-sra.c
gcc/tree-ssa-dom.c
gcc/tree-ssa-threadupdate.c
gcc/tree-ssa-threadupdate.h