aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorHaohaiWen <haohai.wen@intel.com>2023-09-21 09:21:55 +0800
committerGitHub <noreply@github.com>2023-09-21 09:21:55 +0800
commit2f2319cf2406d9830a331cbf015881c55ae78806 (patch)
treed70815eaf6096e79ad74d4e761ba05c0618e4fad /llvm/lib/Analysis/InlineCost.cpp
parenta18ee8b7c95c6dfa410c6acaaf8cffcfde1220b5 (diff)
downloadllvm-2f2319cf2406d9830a331cbf015881c55ae78806.zip
llvm-2f2319cf2406d9830a331cbf015881c55ae78806.tar.gz
llvm-2f2319cf2406d9830a331cbf015881c55ae78806.tar.bz2
[InlineCost] Enable the cost benefit analysis for Sample PGO (#66457)
Enables the cost-benefit-analysis-based inliner by default if we have sample profile.
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r--llvm/lib/Analysis/InlineCost.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index 71d35ad..f5a31628 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -787,7 +787,7 @@ class InlineCostCallAnalyzer final : public CallAnalyzer {
return false;
} else {
// Otherwise, require instrumentation profile.
- if (!PSI->hasInstrumentationProfile())
+ if (!(PSI->hasInstrumentationProfile() || PSI->hasSampleProfile()))
return false;
}