===================================================================
@@ -4749,21 +4749,12 @@ tree
gimple_register_canonical_type (tree t)
{
void **slot;
- tree orig_t = t;
gcc_assert (TYPE_P (t));
if (TYPE_CANONICAL (t))
return TYPE_CANONICAL (t);
- /* Use the leader of our main variant for determining our canonical
- type. The main variant leader is a type that will always
- prevail. */
- t = gimple_register_type (TYPE_MAIN_VARIANT (t));
-
- if (TYPE_CANONICAL (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);
@@ -4783,9 +4774,6 @@ gimple_register_canonical_type (tree t)
*slot = (void *) t;
}
- /* Also cache the canonical type in the non-leaders. */
- TYPE_CANONICAL (orig_t) = t;
-
return t;
}