summaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-23 18:25:41 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-23 18:25:41 +0000
commit24a769d909357fb8b94d4184ac726d3740ef7703 (patch)
tree08d38493f2287d801a46fd580856d47488a4d38a /gcc/lto
parent00c1bd91371d33e1253afb625ceda71e3c261803 (diff)
downloadgcc-24a769d909357fb8b94d4184ac726d3740ef7703.tar.gz
* lto.c (hash_canonical_type): Be sure we hash only types that
need alias set. (gimple_register_canonical_type_1): Do not produce canonical types for types that do not need alias sets. * tree.c (gimple_canonical_types_compatible_p): Sanity check that we do not try to compute canonical type for type that does not need alias set. (verify_type): Drop FIXME for METHOD_TYPE, update FIXME for FUNCITON_TYPE. * tree.h (type_with_alias_set_p): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223608 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/ChangeLog7
-rw-r--r--gcc/lto/lto.c8
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index 45d05850a7a..5fda10033a8 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,5 +1,12 @@
2015-05-22 Jan Hubicka <hubicka@ucw.cz>
+ * lto.c (hash_canonical_type): Be sure we hash only types that
+ need alias set.
+ (gimple_register_canonical_type_1): Do not produce canonical
+ types for types that do not need alias sets.
+
+2015-05-22 Jan Hubicka <hubicka@ucw.cz>
+
* lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
2015-05-19 Jan Hubicka <hubicka@ucw.cz>
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 29059eb30db..169b025eda5 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -309,6 +309,12 @@ hash_canonical_type (tree type)
{
inchash::hash hstate;
+ /* We compute alias sets only for types that needs them.
+ Be sure we do not recurse to something else as we can not hash incomplete
+ types in a way they would have same hash value as compatible complete
+ types. */
+ gcc_checking_assert (type_with_alias_set_p (type));
+
/* Combine a few common features of types so that types are grouped into
smaller sets; when searching for existing matching types to merge,
only existing types having the same features as the new type will be
@@ -489,7 +495,7 @@ gimple_register_canonical_type_1 (tree t, hashval_t hash)
static void
gimple_register_canonical_type (tree t)
{
- if (TYPE_CANONICAL (t))
+ if (TYPE_CANONICAL (t) || !type_with_alias_set_p (t))
return;
gimple_register_canonical_type_1 (t, hash_canonical_type (t));