]> gcc.gnu.org Git - gcc.git/commitdiff
c-common.c (c_common_get_alias_set): Use GGC for type_hash_table.
authorDale Johannesen <dalej@apple.com>
Sat, 16 Oct 2004 22:58:45 +0000 (22:58 +0000)
committerDale Johannesen <dalej@gcc.gnu.org>
Sat, 16 Oct 2004 22:58:45 +0000 (22:58 +0000)
2004-10-16  Dale Johannesen  <dalej@apple.com>

        * c-common.c (c_common_get_alias_set):  Use GGC for type_hash_table.

From-SVN: r89156

gcc/ChangeLog
gcc/c-common.c

index ae3a92a3788e3bfe534bf480abd01cb5c0758f45..2baac15979dd73ca0462df60bb8d58c2a8b523e5 100644 (file)
@@ -1,3 +1,7 @@
+2004-10-16  Dale Johannesen  <dalej@apple.com>
+
+       * c-common.c (c_common_get_alias_set):  Use GGC for type_hash_table.
+
 2004-10-16  Zdenek Dvorak  <dvorakz@suse.cz>
 
        PR tree-optimization/17766
index 2e634fae9ba350a3c69c9fab9cfe6483510dce61..c05779c33ad5a747d1bb281edd99a10dd0431b3e 100644 (file)
@@ -2592,6 +2592,8 @@ c_type_hash (const void *p)
   return ((size << 24) | (i << shift));
 }
 
+static GTY((param_is (union tree_node))) htab_t type_hash_table;
+
 /* Return the typed-based alias set for T, which may be an expression
    or a type.  Return -1 if we don't do anything special.  */
 
@@ -2600,7 +2602,6 @@ c_common_get_alias_set (tree t)
 {
   tree u;
   PTR *slot;
-  static htab_t type_hash_table;
 
   /* Permit type-punning when accessing a union, provided the access
      is directly through the union.  For example, this code does not
@@ -2719,7 +2720,7 @@ c_common_get_alias_set (tree t)
   /* Look up t in hash table.  Only one of the compatible types within each
      alias set is recorded in the table.  */
   if (!type_hash_table)
-    type_hash_table = htab_create (1021, c_type_hash,
+    type_hash_table = htab_create_ggc (1021, c_type_hash,
            (htab_eq) lang_hooks.types_compatible_p,
            NULL);
   slot = htab_find_slot (type_hash_table, t, INSERT);
This page took 0.091162 seconds and 5 git commands to generate.