summaryrefslogtreecommitdiffstats
path: root/gcc/et-forest.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/et-forest.c')
-rw-r--r--gcc/et-forest.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/et-forest.c b/gcc/et-forest.c
index f193afd52d0..b8e55274109 100644
--- a/gcc/et-forest.c
+++ b/gcc/et-forest.c
@@ -505,9 +505,20 @@ void
et_free_tree_force (struct et_node *t)
{
pool_free (et_occurrences, t->rightmost_occ);
+ if (t->parent_occ)
+ pool_free (et_occurrences, t->parent_occ);
pool_free (et_nodes, t);
}
+/* Release the alloc pools, if they are empty. */
+
+void
+et_free_pools (void)
+{
+ free_alloc_pool_if_empty (&et_occurrences);
+ free_alloc_pool_if_empty (&et_nodes);
+}
+
/* Sets father of et tree T to FATHER. */
void
OpenPOWER on IntegriCloud