diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp --- a/llvm/lib/Transforms/IPO/SampleProfile.cpp +++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp @@ -36,6 +36,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/ADT/Twine.h" #include "llvm/Analysis/AssumptionCache.h" +#include "llvm/Analysis/BlockFrequencyInfoImpl.h" #include "llvm/Analysis/CallGraph.h" #include "llvm/Analysis/CallGraphSCCPass.h" #include "llvm/Analysis/InlineAdvisor.h" @@ -1804,6 +1805,10 @@ if (!CallsitePrioritizedInline.getNumOccurrences()) CallsitePrioritizedInline = true; + // Enable iterative-BFI by default for CSSPGO. + if (!UseIterativeBFIInference.getNumOccurrences()) + UseIterativeBFIInference = true; + // Tracker for profiles under different context ContextTracker = std::make_unique(Reader->getProfiles());