aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-05-24 12:40:28 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-05-24 12:40:28 +0000
commit96d91dcf6a4e2130e6f0f72387f90bc31a9f992c (patch)
tree4d0ee86ac31210e10293afa2014bd8a23fbabb5f /gcc/gimple.c
parent1ed1641d71f9fe8380d3edd80e1dbd17998543f5 (diff)
downloadgcc-96d91dcf6a4e2130e6f0f72387f90bc31a9f992c.zip
gcc-96d91dcf6a4e2130e6f0f72387f90bc31a9f992c.tar.gz
gcc-96d91dcf6a4e2130e6f0f72387f90bc31a9f992c.tar.bz2
re PR bootstrap/49078 (LTO bootstrap failed with bootstrap-profiled)
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. From-SVN: r174113
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r--gcc/gimple.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c
index d6c79aa..4c0e4a3 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);