diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-24 12:40:28 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-24 12:40:28 +0000 |
commit | 45014c846698ea141dd7340bbdb181e258840b7c (patch) | |
tree | 4d0ee86ac31210e10293afa2014bd8a23fbabb5f /gcc/gimple.c | |
parent | eb65953e5fb04b26d1fdb09340cee6e262d601b7 (diff) | |
download | gcc-45014c846698ea141dd7340bbdb181e258840b7c.tar.gz |
2011-05-24 Richard Guenther <rguenther@suse.de>
PR bootstrap/49078
* gimple.c (gimple_register_canonical_type): Revert
previous change.
* alias.c (get_alias_set): Only assert that TYPE_CANONICAL
does not for a tree for the case where it matters. Cache
pointer-type alias-sets.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174113 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index d6c79aa1f5c..4c0e4a387df 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -4779,7 +4779,12 @@ gimple_canonical_type_eq (const void *p1, const void *p2) /* Register type T in the global type table gimple_types. If another type T', compatible with T, already existed in gimple_types then return T', otherwise return T. This is used by - LTO to merge identical types read from different TUs. */ + LTO to merge identical types read from different TUs. + + ??? This merging does not exactly match how the tree.c middle-end + functions will assign TYPE_CANONICAL when new types are created + during optimization (which at least happens for pointer and array + types). */ tree gimple_register_canonical_type (tree t) @@ -4800,25 +4805,6 @@ gimple_register_canonical_type (tree t) if (TYPE_CANONICAL (t)) return TYPE_CANONICAL (t); - /* For pointer and reference types do as the middle-end does - the - canonical type is a pointer to the canonical pointed-to type. */ - if (TREE_CODE (t) == POINTER_TYPE) - { - TYPE_CANONICAL (t) - = build_pointer_type_for_mode - (gimple_register_canonical_type (TREE_TYPE (t)), - TYPE_MODE (t), TYPE_REF_CAN_ALIAS_ALL (t)); - return TYPE_CANONICAL (t); - } - else if (TREE_CODE (t) == REFERENCE_TYPE) - { - TYPE_CANONICAL (t) - = build_reference_type_for_mode - (gimple_register_canonical_type (TREE_TYPE (t)), - TYPE_MODE (t), TYPE_REF_CAN_ALIAS_ALL (t)); - return TYPE_CANONICAL (t); - } - if (gimple_canonical_types == NULL) gimple_canonical_types = htab_create_ggc (16381, gimple_canonical_type_hash, gimple_canonical_type_eq, 0); |