aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>2021-03-12 09:19:46 -0800
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>2021-03-12 10:19:50 -0800
commitb7b99b0799fa73ebf57155e5105adc03803e2ed6 (patch)
treea12bac54517fd761e19995f0e1908af480feb97b /llvm/lib/Analysis/InlineCost.cpp
parentf9e2a62cc594c96194908a3ac4804caa07f86ba6 (diff)
downloadllvm-b7b99b0799fa73ebf57155e5105adc03803e2ed6.zip
llvm-b7b99b0799fa73ebf57155e5105adc03803e2ed6.tar.gz
llvm-b7b99b0799fa73ebf57155e5105adc03803e2ed6.tar.bz2
[AMDGPU] Fix -amdgpu-inline-arg-alloca-cost
Before D94153 this threshold was in a pre-scaled units. After D94153 inlining threshold multiplier is not applied to this portion of the threshold anymore. Restore the threshold by applying the multiplier. Differential Revision: https://reviews.llvm.org/D98362
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r--llvm/lib/Analysis/InlineCost.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index a35f5e1..b742259 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -1577,10 +1577,11 @@ void InlineCostCallAnalyzer::updateThreshold(CallBase &Call, Function &Callee) {
}
}
+ Threshold += TTI.adjustInliningThreshold(&Call);
+
// Finally, take the target-specific inlining threshold multiplier into
// account.
Threshold *= TTI.getInliningThresholdMultiplier();
- Threshold += TTI.adjustInliningThreshold(&Call);
SingleBBBonus = Threshold * SingleBBBonusPercent / 100;
VectorBonus = Threshold * VectorBonusPercent / 100;