aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2020-06-04 00:40:17 -0700
committerKazu Hirata <kazu@google.com>2020-06-04 00:40:58 -0700
commit347a599e5f03ab708943559d0a131127b206b576 (patch)
treedb3111702ba3f4c83f455277ae78259971928801 /llvm/lib/Analysis/InlineCost.cpp
parent7eff1a7136049fd38d779f52f905f88181b03679 (diff)
downloadllvm-347a599e5f03ab708943559d0a131127b206b576.zip
llvm-347a599e5f03ab708943559d0a131127b206b576.tar.gz
llvm-347a599e5f03ab708943559d0a131127b206b576.tar.bz2
[Inlining] Introduce -enable-npm-pgo-inline-deferral
Summary: Experiments show that inline deferral past pre-inlining slightly pessimizes the performance. This patch introduces an option to control inline deferral during PGO. The option defaults to true for now (that is, NFC). Reviewers: davidxl Reviewed By: davidxl Subscribers: eraman, hiraditya, haicheng, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80776
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 7377b088..9eea2e9 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -2250,7 +2250,8 @@ Optional<int> llvm::getInliningCostEstimate(
/*HotCallSiteThreshold*/ {},
/*LocallyHotCallSiteThreshold*/ {},
/*ColdCallSiteThreshold*/ {},
- /* ComputeFullInlineCost*/ true};
+ /*ComputeFullInlineCost*/ true,
+ /*EnableDeferral*/ true};
InlineCostCallAnalyzer CA(*Call.getCalledFunction(), Call, Params, CalleeTTI,
GetAssumptionCache, GetBFI, PSI, ORE, true,