dominance.c (free_dominance_info): Speed up by freeing et data structures without maintaining other nodes.

* 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.

From-SVN: r97054
This commit is contained in:
Kazu Hirata 2005-03-25 18:41:28 +00:00 committed by Kazu Hirata
parent ccb527e4b7
commit bef87a346c
4 changed files with 20 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2005-03-25 Kazu Hirata <kazu@cs.umass.edu>
* 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 <dave.anglin@nrc-crnc.gc.ca>
PR target/15491

View file

@ -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;
}

View file

@ -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

View file

@ -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 *);