diff options
author | Dale Johannesen <dalej@apple.com> | 2004-10-16 22:58:45 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@gcc.gnu.org> | 2004-10-16 22:58:45 +0000 |
commit | 4fe52ce98c63dc384ca8324bdbcb104988e6ee0b (patch) | |
tree | e3adf387f1433705cf67f8c6a6f3d95490a8dfe7 | |
parent | 410c47a4d14b844eff8aca12165a615a5d900e48 (diff) | |
download | gcc-4fe52ce98c63dc384ca8324bdbcb104988e6ee0b.zip gcc-4fe52ce98c63dc384ca8324bdbcb104988e6ee0b.tar.gz gcc-4fe52ce98c63dc384ca8324bdbcb104988e6ee0b.tar.bz2 |
c-common.c (c_common_get_alias_set): Use GGC for type_hash_table.
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
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/c-common.c | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ae3a92a..2baac15 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/c-common.c b/gcc/c-common.c index 2e634fa..c05779c 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -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); |