summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-24 22:58:27 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-24 22:58:27 +0000
commit073fef8750ff7e518a1eae26e056d4cc1d2c4313 (patch)
tree6c6496ddfab6090a9d5faadc6583b1547f05c9ff
parentf9b5f7426b95ed5809c2ef8257b962306844f87b (diff)
downloadgcc-073fef8750ff7e518a1eae26e056d4cc1d2c4313.tar.gz
* tree.c (type_hash_marked_p): Consider as marked if debug symbol
number has been set. (type_hash_mark): Mark type itself. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45794 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree.c15
2 files changed, 18 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2ef183d2b35..419ec4b9a02 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Mon Sep 24 18:57:59 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * tree.c (type_hash_marked_p): Consider as marked if debug symbol
+ number has been set.
+ (type_hash_mark): Mark type itself.
+
2001-09-24 Neil Booth <neil@daikokuya.demon.co.uk>
* c-lex.c (cb_def_pragma): Update.
diff --git a/gcc/tree.c b/gcc/tree.c
index 1741f6a7f02..8a8d22d9760 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -3139,22 +3139,31 @@ type_hash_canon (hashcode, type)
}
}
-/* See if the data pointed to by the type hash table is marked. */
+/* See if the data pointed to by the type hash table is marked. We consider
+ it marked if the type is marked or if a debug type number or symbol
+ table entry has been made for the type. This reduces the amount of
+ debugging output and eliminates that dependency of the debug output on
+ the number of garbage collections. */
static int
type_hash_marked_p (p)
const void *p;
{
- return ggc_marked_p (((struct type_hash *) p)->type);
+ tree type = ((struct type_hash *) p)->type;
+
+ return ggc_marked_p (type) || TYPE_SYMTAB_POINTER (type);
}
-/* Mark the entry in the type hash table the type it points to is marked. */
+/* Mark the entry in the type hash table the type it points to is marked.
+ Also mark the type in case we are considering this entry "marked" by
+ virtue of TYPE_SYMTAB_POINTER being set. */
static void
type_hash_mark (p)
const void *p;
{
ggc_mark (p);
+ ggc_mark_tree (((struct type_hash *) p)->type);
}
/* Mark the hashtable slot pointed to by ENTRY (which is really a