From: Richard Biener Date: Fri, 6 Nov 2015 13:45:54 +0000 (+0000) Subject: tree-ssa-sccvn.c (class sccvn_dom_walker): Add destructor. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ff56974436c9c8f994c9c80040ca026bde0965ee;p=gcc.git tree-ssa-sccvn.c (class sccvn_dom_walker): Add destructor. 2015-11-06 Richard Biener * tree-ssa-sccvn.c (class sccvn_dom_walker): Add destructor. * lra.c (init_reg_info): Truncate copy_vec instead of re-allocating a new one and leaking the old. * ipa-inline-analysis.c (estimate_function_body_sizes): Free bb_infos vec. * sched-deps.c (sched_deps_finish): Free the dn/dl pools. * postreload-gcse.c (free_mem): Free modify_mem_list and canon_modify_mem_list. From-SVN: r229850 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0a83f6fbe97..f83d760354e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2015-11-06 Richard Biener + + * tree-ssa-sccvn.c (class sccvn_dom_walker): Add destructor. + * lra.c (init_reg_info): Truncate copy_vec instead of + re-allocating a new one and leaking the old. + * ipa-inline-analysis.c (estimate_function_body_sizes): Free + bb_infos vec. + * sched-deps.c (sched_deps_finish): Free the dn/dl pools. + * postreload-gcse.c (free_mem): Free modify_mem_list and + canon_modify_mem_list. + 2015-11-06 Ilya Enkovich PR tree-optimization/68145 diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index a3cd769a461..c07b0da9007 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -2853,6 +2853,7 @@ estimate_function_body_sizes (struct cgraph_node *node, bool early) inline_summaries->get (node)->self_time = time; inline_summaries->get (node)->self_size = size; nonconstant_names.release (); + fbi.bb_infos.release (); if (opt_for_fn (node->decl, optimize)) { if (!early) diff --git a/gcc/lra.c b/gcc/lra.c index 0cd37f02032..0995c54aee4 100644 --- a/gcc/lra.c +++ b/gcc/lra.c @@ -1293,7 +1293,7 @@ init_reg_info (void) lra_reg_info = XNEWVEC (struct lra_reg, reg_info_size); for (i = 0; i < reg_info_size; i++) initialize_lra_reg_info_element (i); - copy_vec.create (100); + copy_vec.truncate (0); } diff --git a/gcc/postreload-gcse.c b/gcc/postreload-gcse.c index ea4bba4365e..f8a770e25f2 100644 --- a/gcc/postreload-gcse.c +++ b/gcc/postreload-gcse.c @@ -348,6 +348,8 @@ free_mem (void) BITMAP_FREE (blocks_with_calls); BITMAP_FREE (modify_mem_list_set); free (reg_avail_info); + free (modify_mem_list); + free (canon_modify_mem_list); } diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index 220eea461f6..4f64fa9d78d 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -4092,9 +4092,9 @@ void sched_deps_finish (void) { gcc_assert (deps_pools_are_empty_p ()); - dn_pool->release_if_empty (); + delete dn_pool; + delete dl_pool; dn_pool = NULL; - dl_pool->release_if_empty (); dl_pool = NULL; h_d_i_d.release (); diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 159a7b60f81..c5f5b2760d0 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -4154,6 +4154,7 @@ class sccvn_dom_walker : public dom_walker public: sccvn_dom_walker () : dom_walker (CDI_DOMINATORS), fail (false), cond_stack (vNULL) {} + ~sccvn_dom_walker (); virtual void before_dom_children (basic_block); virtual void after_dom_children (basic_block); @@ -4168,6 +4169,11 @@ public: cond_stack; }; +sccvn_dom_walker::~sccvn_dom_walker () +{ + cond_stack.release (); +} + /* Record a temporary condition for the BB and its dominated blocks. */ void