summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-25 18:41:28 +0000
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-25 18:41:28 +0000
commit108beec73e6f9087513651b6d42aa253398d7ba0 (patch)
tree36dc2c60cc0910678a8a57037651dc2c5999e4b5 /gcc
parent71cb16ef92c5f229751e3bcfc17c1a19c051b425 (diff)
downloadgcc-108beec73e6f9087513651b6d42aa253398d7ba0.tar.gz
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/dominance.c6
-rw-r--r--gcc/et-forest.c9
-rw-r--r--gcc/et-forest.h1
4 files changed, 20 insertions, 3 deletions
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 <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
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 *);