diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-24 19:35:38 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-24 19:35:38 +0000 |
commit | b89bfdca5bbfdd456cc22b8ae8a74d740f2b971d (patch) | |
tree | 2720a21d3a42af746351fb5f5e419414f55e6da8 /gcc/lto/lto.c | |
parent | 6c59e0ffaa5e7040d15aa36fd686a0d1da24c724 (diff) | |
download | gcc-b89bfdca5bbfdd456cc22b8ae8a74d740f2b971d.tar.gz |
* lto-streamer-in.c (lto_read_body_or_constructor): Set TYPE_CANONICAL
only for types where LTO sets them.
* tree.c (build_array_type_1): Do ont set TYPE_CANONICAL for LTO.
(make_vector_type): Likewise.
(gimple_canonical_types_compatible_p): Use canonical_type_used_p.
* tree.h (canonical_type_used_p): New inline.
* alias.c (get_alias_set): Handle structural equality for all
types that pass canonical_type_used_p.
(record_component_aliases): Look through all types with
record_component_aliases for possible pointers; sanity check that
the alias sets match.
* lto.c (iterative_hash_canonical_type): Recruse for all types
which pass !canonical_type_used_p.
(gimple_register_canonical_type_1): Sanity check we do not compute
canonical type of anything with !canonical_type_used_p.
(gimple_register_canonical_type): Skip all types that are
!canonical_type_used_p
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230835 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto/lto.c')
-rw-r--r-- | gcc/lto/lto.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index c4c51588adc..b1e2d6e8090 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -389,9 +389,7 @@ iterative_hash_canonical_type (tree type, inchash::hash &hstate) /* All type variants have same TYPE_CANONICAL. */ type = TYPE_MAIN_VARIANT (type); - /* We do not compute TYPE_CANONICAl of POINTER_TYPE because the aliasing - code never use it anyway. */ - if (POINTER_TYPE_P (type)) + if (!canonical_type_used_p (type)) v = hash_canonical_type (type); /* An already processed type. */ else if (TYPE_CANONICAL (type)) @@ -444,7 +442,7 @@ gimple_register_canonical_type_1 (tree t, hashval_t hash) gcc_checking_assert (TYPE_P (t) && !TYPE_CANONICAL (t) && type_with_alias_set_p (t) - && !POINTER_TYPE_P (t)); + && canonical_type_used_p (t)); slot = htab_find_slot_with_hash (gimple_canonical_types, t, hash, INSERT); if (*slot) @@ -477,7 +475,8 @@ gimple_register_canonical_type_1 (tree t, hashval_t hash) static void gimple_register_canonical_type (tree t) { - if (TYPE_CANONICAL (t) || !type_with_alias_set_p (t) || POINTER_TYPE_P (t)) + if (TYPE_CANONICAL (t) || !type_with_alias_set_p (t) + || !canonical_type_used_p (t)) return; /* Canonical types are same among all complete variants. */ |