[llvm] a60ffee - Revert "[InlineCost] Enable the cost benefit analysis on FDO"
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 25 13:42:33 PDT 2021
Author: Nico Weber
Date: 2021-03-25T16:42:19-04:00
New Revision: a60ffee3f4ef36f2211a149475cc2cb60164d4a8
URL: https://github.com/llvm/llvm-project/commit/a60ffee3f4ef36f2211a149475cc2cb60164d4a8
DIFF: https://github.com/llvm/llvm-project/commit/a60ffee3f4ef36f2211a149475cc2cb60164d4a8.diff
LOG: 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
Added:
Modified:
llvm/lib/Analysis/InlineCost.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index fd4e1a18817b..c02b56797be3 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;
More information about the llvm-commits
mailing list