[PATCH] D92804: [ICP] Don't promote when target not defined in module
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 7 17:16:42 PST 2020
tejohnson created this revision.
tejohnson added a reviewer: wmi.
Herald added subscribers: wenlei, steven_wu, hiraditya.
tejohnson requested review of this revision.
Herald added a project: LLVM.
This guards against cases where the symbol was dead code eliminated in
the binary by ThinLTO, and we have a sample profile collected for one
binary but used to optimize another.
Most of the benefit from ICP comes from inlining the target, which we
can't do with only a declaration anyway. If this is in the pre-ThinLTO
link step (e.g. for instrumentation based PGO), we will attempt the
promotion again in the ThinLTO backend after importing anyway, and we
don't need the early promotion to facilitate that.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D92804
Files:
llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
llvm/test/LTO/Resolution/X86/load-sample-prof-icp.ll
llvm/test/Transforms/PGOProfile/icp_covariant_call_return.ll
llvm/test/Transforms/PGOProfile/icp_covariant_invoke_return.ll
llvm/test/Transforms/PGOProfile/indirect_call_promotion_musttail.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92804.310063.patch
Type: text/x-patch
Size: 4198 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201208/82d47210/attachment.bin>
More information about the llvm-commits
mailing list