From 108beec73e6f9087513651b6d42aa253398d7ba0 Mon Sep 17 00:00:00 2001 From: kazu Date: Fri, 25 Mar 2005 18:41:28 +0000 Subject: * dominance.c (free_dominance_info): Speed up by freeing et data structures without maintaining other nodes. * et-forest.c (et_free_tree_force): New. * et-forest.h: Add a prototype for et_free_tree_force. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97054 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/dominance.c | 6 +++--- gcc/et-forest.c | 9 +++++++++ gcc/et-forest.h | 1 + 4 files changed, 20 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1559b194312..f968b30ccca 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-03-25 Kazu Hirata + + * dominance.c (free_dominance_info): Speed up by freeing et + data structures without maintaining other nodes. + * et-forest.c (et_free_tree_force): New. + * et-forest.h: Add a prototype for et_free_tree_force. + 2005-03-25 John David Anglin PR target/15491 diff --git a/gcc/dominance.c b/gcc/dominance.c index f001c680243..d48701d96a5 100644 --- a/gcc/dominance.c +++ b/gcc/dominance.c @@ -659,11 +659,11 @@ free_dominance_info (enum cdi_direction dir) FOR_ALL_BB (bb) { - delete_from_dominance_info (dir, bb); + et_free_tree_force (bb->dom[dir]); + bb->dom[dir] = NULL; } - /* If there are any nodes left, something is wrong. */ - gcc_assert (!n_bbs_in_dom_tree[dir]); + n_bbs_in_dom_tree[dir] = 0; dom_computed[dir] = DOM_NONE; } diff --git a/gcc/et-forest.c b/gcc/et-forest.c index 7fbbb77312c..df7c22aff40 100644 --- a/gcc/et-forest.c +++ b/gcc/et-forest.c @@ -499,6 +499,15 @@ et_free_tree (struct et_node *t) pool_free (et_nodes, t); } +/* Releases et tree T without maintaining other nodes. */ + +void +et_free_tree_force (struct et_node *t) +{ + pool_free (et_occurrences, t->rightmost_occ); + pool_free (et_nodes, t); +} + /* Sets father of et tree T to FATHER. */ void diff --git a/gcc/et-forest.h b/gcc/et-forest.h index 2f2c260e8d8..79d4bc9723d 100644 --- a/gcc/et-forest.h +++ b/gcc/et-forest.h @@ -73,6 +73,7 @@ struct et_node struct et_node *et_new_tree (void *data); void et_free_tree (struct et_node *); +void et_free_tree_force (struct et_node *); void et_set_father (struct et_node *, struct et_node *); void et_split (struct et_node *); struct et_node *et_nca (struct et_node *, struct et_node *); -- cgit v1.2.1