This is an archive of the discontinued LLVM Phabricator instance.

All .xdata sections are eligble for ICF
ClosedPublic

Authored by rnk on Nov 16 2017, 4:59 PM.

Details

Summary

Many small functions have identical unwind info because they push the
same sets of CSRs in the same order and have the same stack and prologue
size. The VC linker merges duplicate .xdata, and so should LLD.

This reduces the .xdata section size of clang.exe from 1.8MB to 94KB.

Event Timeline

rnk created this revision.Nov 16 2017, 4:59 PM
ruiu accepted this revision.Nov 16 2017, 5:23 PM

LGTM

lld/COFF/ICF.cpp
88–92

I'd add bool Xdata for consistency.

This revision is now accepted and ready to land.Nov 16 2017, 5:23 PM
rnk added inline comments.Nov 17 2017, 11:46 AM
lld/COFF/ICF.cpp
88–92

I want to short-circuit the section name string comparison, though. How about this?

rnk updated this revision to Diff 123387.Nov 17 2017, 11:49 AM
  • adjust isEligble conditions
This revision was automatically updated to reflect the committed changes.