[PATCH] D128404: [BOLT] Restrict icp-inline to callsites
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 27 11:09:07 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd58b5a06147e: [BOLT] Restrict icp-inline to callsites (authored by Amir).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128404/new/
https://reviews.llvm.org/D128404
Files:
bolt/lib/Passes/IndirectCallPromotion.cpp
Index: bolt/lib/Passes/IndirectCallPromotion.cpp
===================================================================
--- bolt/lib/Passes/IndirectCallPromotion.cpp
+++ bolt/lib/Passes/IndirectCallPromotion.cpp
@@ -977,10 +977,8 @@
const size_t TrialN = TopN ? std::min(TopN, Targets.size()) : Targets.size();
- if (opts::ICPTopCallsites > 0) {
- if (!BC.MIB->hasAnnotation(Inst, "DoICP"))
- return 0;
- }
+ if (opts::ICPTopCallsites && !BC.MIB->hasAnnotation(Inst, "DoICP"))
+ return 0;
// Pick the top N targets.
uint64_t TotalMispredictsTopN = 0;
@@ -1064,11 +1062,11 @@
// Filter by inline-ability of target functions, stop at first target that
// can't be inlined.
- if (opts::ICPPeelForInline) {
+ if (!IsJumpTable && opts::ICPPeelForInline) {
for (size_t I = 0; I < N; ++I) {
const MCSymbol *TargetSym = Targets[I].To.Sym;
const BinaryFunction *TargetBF = BC.getFunctionForSymbol(TargetSym);
- if (!BinaryFunctionPass::shouldOptimize(*TargetBF) ||
+ if (!TargetBF || !BinaryFunctionPass::shouldOptimize(*TargetBF) ||
getInliningInfo(*TargetBF).Type == InliningType::INL_NONE) {
N = I;
break;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128404.440322.patch
Type: text/x-patch
Size: 1194 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220627/e7b0adce/attachment.bin>
More information about the llvm-commits
mailing list