aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2021-03-25 16:41:32 -0400
committerNico Weber <thakis@chromium.org>2021-03-25 16:42:19 -0400
commita60ffee3f4ef36f2211a149475cc2cb60164d4a8 (patch)
treecb412e066ce56f4681fa34c36957c3e03e56be35 /llvm/lib/Analysis/InlineCost.cpp
parent1abaadb30d37e229eedb0e2ede6cd7f788aed76b (diff)
downloadllvm-a60ffee3f4ef36f2211a149475cc2cb60164d4a8.zip
llvm-a60ffee3f4ef36f2211a149475cc2cb60164d4a8.tar.gz
llvm-a60ffee3f4ef36f2211a149475cc2cb60164d4a8.tar.bz2
Revert "[InlineCost] Enable the cost benefit analysis on FDO"
This reverts commit ef69aa961d12dee2141a79b05c9637d8cc9c0c74. Makes clang assert in PGO builds, see repro tgz in https://bugs.chromium.org/p/chromium/issues/detail?id=1192783#c6
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r--llvm/lib/Analysis/InlineCost.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index fd4e1a1..c02b567 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -675,22 +675,15 @@ class InlineCostCallAnalyzer final : public CallAnalyzer {
}
bool isCostBenefitAnalysisEnabled() {
+ if (!InlineEnableCostBenefitAnalysis)
+ return false;
+
if (!PSI || !PSI->hasProfileSummary())
return false;
if (!GetBFI)
return false;
- if (InlineEnableCostBenefitAnalysis.getNumOccurrences()) {
- // Honor the explicit request from the user.
- if (!InlineEnableCostBenefitAnalysis)
- return false;
- } else {
- // Otherwise, require instrumentation profile.
- if (!PSI->hasInstrumentationProfile())
- return false;
- }
-
auto *Caller = CandidateCall.getParent()->getParent();
if (!Caller->getEntryCount())
return false;