[llvm] [VPlan] Use BlockFrequencyInfo in getPredBlockCostDivisor (PR #158690)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 18 02:50:43 PST 2025
================
@@ -10265,9 +10272,7 @@ PreservedAnalyses LoopVectorizePass::run(Function &F,
auto &MAMProxy = AM.getResult<ModuleAnalysisManagerFunctionProxy>(F);
PSI = MAMProxy.getCachedResult<ProfileSummaryAnalysis>(*F.getParent());
- BFI = nullptr;
- if (PSI && PSI->hasProfileSummary())
- BFI = &AM.getResult<BlockFrequencyAnalysis>(F);
+ BFI = &AM.getResult<BlockFrequencyAnalysis>(F);
----------------
lukel97 wrote:
Looks there's like's a significant compile time increase on -O2 & -O3: https://llvm-compile-time-tracker.com/compare.php?from=f15b756b56d0653181f062901916806bc5eba280&to=fb50e0f89db09b13cb9c4ac2c69dda8c92169eee&stat=instructions%3Au
I'm pretty sure this is from LoopVectorizer now requesting BranchProbabilityInfo and BlockFrequencyInfo, not because we're invalidating it since we already previously invalidated all CFG analyses.
I'm going to see if we can only request BranchProbabilityInfo on demand, e.g. when we know vectorization is legal.
https://github.com/llvm/llvm-project/pull/158690
More information about the llvm-commits
mailing list