[llvm] [VPlan] Use BlockFrequencyInfo in getPredBlockCostDivisor (PR #158690)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 1 03:39:56 PST 2025
================
@@ -2886,6 +2884,23 @@ bool LoopVectorizationCostModel::isPredicatedInst(Instruction *I) const {
}
}
+unsigned LoopVectorizationCostModel::getPredBlockCostDivisor(
+ TargetTransformInfo::TargetCostKind CostKind, const BasicBlock *BB) const {
+ // If the block wasn't originally predicated then return early to avoid
+ // computing BlockFrequencyInfo unnecessarily.
+ if (!Legal->blockNeedsPredication(BB))
+ return 1;
+ if (CostKind == TTI::TCK_CodeSize)
----------------
lukel97 wrote:
Done in 1022c7ff7af87856671a6cd85b2d97d97a4e8f0d
https://github.com/llvm/llvm-project/pull/158690
More information about the llvm-commits
mailing list