This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/54312] New: uniquify_nodes takes 12% of Mozilla LTO build
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 18 Aug 2012 09:46:55 +0000
- Subject: [Bug lto/54312] New: uniquify_nodes takes 12% of Mozilla LTO build
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54312
Bug #: 54312
Summary: uniquify_nodes takes 12% of Mozilla LTO build
Classification: Unclassified
Product: gcc
Version: lto
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hubicka@gcc.gnu.org
uniquify_nodes has quadratic loop removing types from variant lists:
/* Remove us from our main variant list if we are not the
variant leader. */
if (TYPE_MAIN_VARIANT (t) != t)
{
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;
}
this consume a lot of time building Mozilla (and was introduced by Michael's
patch cleaning up the stream in process). Can't we do a bit better here?
(this was introduced in 4.7)
Honza