[LTO] Promote before performing weak resolution
authorMehdi Amini <mehdi.amini@apple.com>
Thu, 18 Aug 2016 00:59:24 +0000 (00:59 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Thu, 18 Aug 2016 00:59:24 +0000 (00:59 +0000)
commit8ac7b32207957d99ad903dc2d764ca1740c33755
tree55906abb6af704ffbfa00e543c3196c806fd1459
parentd5ec14989d7cf87082779bf8a85750a176e1e0bd
[LTO] Promote before performing weak resolution

Summary:
This was reversed compared to ThinLTOCodeGenerator for some reason,
and lead to an increased code-size on my tests. I figured that the
weak resolution may internalize a linkonce function, which will be
promoted immediately (and renamed), before being internalized again.

Reviewers: tejohnson

Subscribers: pcc, llvm-commits, mehdi_amini

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

llvm-svn: 279021
llvm/lib/LTO/LTOBackend.cpp
llvm/test/ThinLTO/X86/internalize.ll