All .xdata sections are eligble for ICF
authorReid Kleckner <rnk@google.com>
Fri, 17 Nov 2017 19:50:10 +0000 (19:50 +0000)
committerReid Kleckner <rnk@google.com>
Fri, 17 Nov 2017 19:50:10 +0000 (19:50 +0000)
commitd99ac29a2461fa23bfb70e228037c708ccac9b2a
treeee38a1e883a356410c4c88ca1213a5ace9856c1b
parentdd01ddbe67da0a2081aa111a8a818b30702babb2
All .xdata sections are eligble for ICF

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.

Reviewers: pcc, ruiu

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D40160

llvm-svn: 318547
lld/COFF/ICF.cpp
lld/test/COFF/icf-xdata.s [new file with mode: 0644]