1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00

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
This commit is contained in:
Nico Weber 2021-03-25 16:41:32 -04:00
parent 4def33398a
commit 124a82a5ee

View File

@ -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;