Commit 46237a73 authored by rguenth's avatar rguenth
Browse files

2011-05-17 Richard Guenther <rguenther@suse.de>

	* gimple.c (gimple_register_canonical_type): Use the main-variant
	leader for computing the canonical type.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173826 138bc75d-0d04-0410-961f-82ee72b054a4
parent 6145a46d
2011-05-17 Richard Guenther <rguenther@suse.de>
* gimple.c (gimple_register_canonical_type): Use the main-variant
leader for computing the canonical type.
2011-05-17 Nick Clifton <nickc@redhat.com>
 
* config/rx/rx.c (rx_memory_move_cost): Include cost of register
......
......@@ -4856,19 +4856,14 @@ gimple_register_canonical_type (tree t)
if (TYPE_CANONICAL (t))
return TYPE_CANONICAL (t);
/* Always register the type itself first so that if it turns out
to be the canonical type it will be the one we merge to as well. */
t = gimple_register_type (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);
/* 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. */
if (TYPE_MAIN_VARIANT (t) != t)
gimple_register_canonical_type (TYPE_MAIN_VARIANT (t));
if (gimple_canonical_types == NULL)
gimple_canonical_types = htab_create_ggc (16381, gimple_canonical_type_hash,
gimple_canonical_type_eq, 0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment