diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-08-18 00:59:24 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-08-18 00:59:24 +0000 |
commit | 8ac7b32207957d99ad903dc2d764ca1740c33755 (patch) | |
tree | 55906abb6af704ffbfa00e543c3196c806fd1459 /llvm/lib/LTO/LTOBackend.cpp | |
parent | d5ec14989d7cf87082779bf8a85750a176e1e0bd (diff) | |
download | bcm5719-llvm-8ac7b32207957d99ad903dc2d764ca1740c33755.tar.gz bcm5719-llvm-8ac7b32207957d99ad903dc2d764ca1740c33755.zip |
[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
Diffstat (limited to 'llvm/lib/LTO/LTOBackend.cpp')
-rw-r--r-- | llvm/lib/LTO/LTOBackend.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp index ddd0a6d8e58..935152b970d 100644 --- a/llvm/lib/LTO/LTOBackend.cpp +++ b/llvm/lib/LTO/LTOBackend.cpp @@ -250,10 +250,10 @@ Error lto::thinBackend(Config &Conf, unsigned Task, AddOutputFn AddOutput, if (Conf.PreOptModuleHook && !Conf.PreOptModuleHook(Task, Mod)) return Error(); - thinLTOResolveWeakForLinkerModule(Mod, DefinedGlobals); - renameModuleForThinLTO(Mod, CombinedIndex); + thinLTOResolveWeakForLinkerModule(Mod, DefinedGlobals); + if (Conf.PostPromoteModuleHook && !Conf.PostPromoteModuleHook(Task, Mod)) return Error(); |