re PR lto/54312 (uniquify_nodes takes 12% of Mozilla LTO build)

PR lto/54312
	* lto.c (uniquify_nodes): Remove quadratic loop checking if the
	type is variant leader.

From-SVN: r191228
This commit is contained in:
Jan Hubicka 2012-09-12 18:26:19 +02:00 committed by Jan Hubicka
parent ed56b7f958
commit b5c7cdfb0a
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2012-09-11 Jan Hubicka <jh@suse.cz>
PR lto/54312
* lto.c (uniquify_nodes): Remove quadratic loop checking if the
type is variant leader.
2012-09-11 Richard Guenther <rguenther@suse.de>
* lto.c (enum gtc_mode): Remove.

View File

@ -1850,6 +1850,7 @@ uniquify_nodes (struct data_in *data_in, unsigned from)
variant list state before fixup is broken. */
tree tem, mv;
#ifdef ENABLE_CHECKING
/* Remove us from our main variant list if we are not the
variant leader. */
if (TYPE_MAIN_VARIANT (t) != t)
@ -1857,10 +1858,9 @@ uniquify_nodes (struct data_in *data_in, unsigned from)
tem = TYPE_MAIN_VARIANT (t);
while (tem && TYPE_NEXT_VARIANT (tem) != t)
tem = TYPE_NEXT_VARIANT (tem);
if (tem)
TYPE_NEXT_VARIANT (tem) = TYPE_NEXT_VARIANT (t);
TYPE_NEXT_VARIANT (t) = NULL_TREE;
gcc_assert (!tem && !TYPE_NEXT_VARIANT (t));
}
#endif
/* Query our new main variant. */
mv = GIMPLE_REGISTER_TYPE (TYPE_MAIN_VARIANT (t));