diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-06-20 16:19:29 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-06-20 16:19:29 +0000 |
commit | 0a06d4f08c513a184a2f3bbb477b701bc65e9b15 (patch) | |
tree | 9147dcee09484286cbe9b33011aa8f2b85f12e02 /gcc/et-forest.c | |
parent | 9fd22806c8efa2bfafae3691c43e691b772d9286 (diff) | |
download | gcc-0a06d4f08c513a184a2f3bbb477b701bc65e9b15.tar.gz |
2006-06-20 Richard Guenther <rguenther@suse.de>
Michael Matz <matz@suse.de>
* alloc-pool.h (free_alloc_pool_if_empty): Prototype new
function.
* alloc-pool.c (free_alloc_pool_if_empty): New function.
* et-forest.h (et_free_pools): Prototype new function.
* et-forest.c (et_free_tree_force): Free parent occurrence.
(et_free_pools): New function.
* dominance.c (free_dominance_info): Free et-forest alloc
pools.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114817 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/et-forest.c')
-rw-r--r-- | gcc/et-forest.c | 11 |
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 |