aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-06-13 14:14:17 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-06-13 14:14:17 +0000
commit4a2ac96fb7e845adc573a3accfafdd534e179156 (patch)
tree35daaa9972d65e4f2ede54da386f2214ce5ac3cb /gcc/gimple.c
parentba90d838257853023abae85f8c393eda41c50189 (diff)
downloadgcc-4a2ac96fb7e845adc573a3accfafdd534e179156.zip
gcc-4a2ac96fb7e845adc573a3accfafdd534e179156.tar.gz
gcc-4a2ac96fb7e845adc573a3accfafdd534e179156.tar.bz2
lto-streamer-in.c (lto_input_ts_type_tree_pointers): Do not stream but initialize TYPE_CANONICAL to NULL.
2010-06-13 Richard Guenther <rguenther@suse.de> * lto-streamer-in.c (lto_input_ts_type_tree_pointers): Do not stream but initialize TYPE_CANONICAL to NULL. (lto_output_ts_type_tree_pointers): Do not stream TYPE_CANONICAL. * gimple.c (gimple_types_compatible_p): Disregard TYPE_STRUCTURAL_EQUALITY_P. (gimple_register_type): Use TYPE_CANONICAL as cache. * lto-streamer.c (lto_record_common_node): Zero TYPE_CANONICAL before registering common types. * config/i386/i386.c (ix86_function_arg_boundary): Do not use TYPE_CANONICAL, instead use TYPE_MAIN_VARIANT. * tree.h (TYPE_CANONICAL): Clarify documentation. lto/ * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL. From-SVN: r160679
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r--gcc/gimple.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c
index b949985..1a10f31 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -3593,12 +3593,6 @@ gimple_types_compatible_p (tree t1, tree t2)
{
tree f1, f2;
- /* If one type requires structural equality checks and the
- other doesn't, do not merge the types. */
- if (TYPE_STRUCTURAL_EQUALITY_P (t1)
- != TYPE_STRUCTURAL_EQUALITY_P (t2))
- goto different_types;
-
/* The struct tags shall compare equal. */
if (!compare_type_names_p (TYPE_MAIN_VARIANT (t1),
TYPE_MAIN_VARIANT (t2), false))
@@ -3955,6 +3949,11 @@ gimple_register_type (tree t)
gcc_assert (TYPE_P (t));
+ /* In TYPE_CANONICAL we cache the result of gimple_register_type.
+ It is initially set to NULL during LTO streaming. */
+ if (TYPE_CANONICAL (t))
+ return TYPE_CANONICAL (t);
+
/* Always register the main variant first. This is important so we
pick up the non-typedef variants as canonical, otherwise we'll end
up taking typedef ids for structure tags during comparison. */
@@ -4018,10 +4017,14 @@ gimple_register_type (tree t)
TYPE_NEXT_REF_TO (t) = NULL_TREE;
}
+ TYPE_CANONICAL (t) = new_type;
t = new_type;
}
else
- *slot = (void *) t;
+ {
+ TYPE_CANONICAL (t) = t;
+ *slot = (void *) t;
+ }
return t;
}