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
committerHaohai Wen <haohai.wen@intel.com>2023-09-21 12:44:24 +0800
commit954979d681339c2f44e38e669d67b9183a5cf92d (patch)
tree51c99f2c962916a3cc16f90b6f04bad75adb9192 /llvm/lib/Analysis/InlineCost.cpp
parent7641c220a03f6ecef13a5ec76d1b2056ff7bbde5 (diff)
downloadllvm-954979d681339c2f44e38e669d67b9183a5cf92d.zip
llvm-954979d681339c2f44e38e669d67b9183a5cf92d.tar.gz
llvm-954979d681339c2f44e38e669d67b9183a5cf92d.tar.bz2
Reland [InlineCost] Enable the cost benefit analysis for Sample PGO (#66457)
Enables the cost-benefit-analysis-based inliner by default if we have sample profile. No extra fix is required.
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;
}