2015-11-06 Richard Biener <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Nov 2015 13:45:54 +0000 (13:45 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Nov 2015 13:45:54 +0000 (13:45 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229850 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ipa-inline-analysis.c
gcc/lra.c
gcc/postreload-gcse.c
gcc/sched-deps.c
gcc/tree-ssa-sccvn.c

index 0a83f6f..f83d760 100644 (file)
@@ -1,3 +1,14 @@
+2015-11-06  Richard Biener  <rguenther@suse.de>
+
+       * 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  <enkovich.gnu@gmail.com>
 
        PR tree-optimization/68145
index a3cd769..c07b0da 100644 (file)
@@ -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)
index 0cd37f0..0995c54 100644 (file)
--- 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);
 }
 
 
index ea4bba4..f8a770e 100644 (file)
@@ -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);
 }
 \f
 
index 220eea4..4f64fa9 100644 (file)
@@ -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 ();
index 159a7b6..c5f5b27 100644 (file)
@@ -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