diff options
author | marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-09 15:45:59 +0000 |
---|---|---|
committer | marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-09 15:45:59 +0000 |
commit | b7cbf36d16bd2ea5194da0ced12a2421f213aa6b (patch) | |
tree | a60b2807573bbeab492c0ef1ec1bb75bcd6b8efa /gcc/tree-sra.c | |
parent | 7758d60897a73c70ff41838698b6fcfdb1346873 (diff) | |
download | gcc-b7cbf36d16bd2ea5194da0ced12a2421f213aa6b.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230027 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r-- | gcc/tree-sra.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index a89630876c7..30aee19aae7 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -674,6 +674,12 @@ sra_deinitialize (void) assign_link_pool.release (); obstack_free (&name_obstack, NULL); + /* TODO: hash_map does not support traits that can release + value type of the hash_map. */ + for (hash_map<tree, auto_vec<access_p> >::iterator it = + base_access_vec->begin (); it != base_access_vec->end (); ++it) + (*it).second.release (); + delete base_access_vec; } |