This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Tweak to type_hash change
- To: gcc-patches at gcc dot gnu dot org
- Subject: Tweak to type_hash change
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Mon, 24 Sep 01 19:04:53 EDT
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.
*** tree.c 2001/09/21 01:26:52 1.211
--- tree.c 2001/09/24 22:15:36
*************** type_hash_canon (hashcode, type)
*** 3140,3144 ****
}
! /* See if the data pointed to by the type hash table is marked. */
static int
--- 3140,3148 ----
}
! /* 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)
*** 3146,3153 ****
const void *p;
{
! return ggc_marked_p (((struct type_hash *) p)->type);
}
! /* Mark the entry in the type hash table the type it points to is marked. */
static void
--- 3150,3161 ----
const void *p;
{
! 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.
! 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)
*** 3156,3159 ****
--- 3164,3168 ----
{
ggc_mark (p);
+ ggc_mark_tree (((struct type_hash *) p)->type);
}