This is an archive of the discontinued LLVM Phabricator instance.

COFF: ICF: Include contents of referenced sections in initial partitioning hash. NFCI.
ClosedPublic

Authored by pcc on Nov 21 2018, 1:07 PM.

Details

Summary

Previously we were taking over 13 minutes to link Firefox's xul.dll
on ARM64; this reduces link time to around 18s on my machine.

The root cause of the problem was that all of the input .pdata sections
had the same unrelocated section data and therefore the same hash,
which made segregation quadratic in the number of .pdata sections. The
reason why we weren't observing this on other architectures was that
ARM has a different .pdata format. On non-ARM the format is (start
address, end address, .xdata), which caused the size of the function
to appear in the unrelocated section data where the end address field
is. However, the ARM format omits the end address field.

Fixes PR39667.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc created this revision.Nov 21 2018, 1:07 PM
pcc edited the summary of this revision. (Show Details)Nov 21 2018, 1:14 PM
rnk accepted this revision.Nov 21 2018, 1:17 PM

lgtm, I agree ICF will produce the same results if to do one level of symbol resolution when building a content hash.

This revision is now accepted and ready to land.Nov 21 2018, 1:17 PM
This revision was automatically updated to reflect the committed changes.
ruiu added a comment.Nov 26 2018, 11:31 AM

Very interesting. Maybe we should do the same thing for ELF?

pcc added a comment.Nov 26 2018, 11:33 AM

Very interesting. Maybe we should do the same thing for ELF?

D54773 :)