[llvm] [VPlan] Use BlockFrequencyInfo in getPredBlockCostDivisor (PR #158690)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 17 23:13:31 PST 2025
================
@@ -1239,22 +1241,9 @@ class LoopVectorizationCostModel {
/// only contribute 1/X of its cost to the total cost calculation, but when
/// optimizing for code size it will just be 1 as code size costs don't depend
/// on execution probabilities.
- ///
- /// TODO: We should use actual block probability here, if available.
- /// Currently, we always assume predicated blocks have a 50% chance of
- /// executing, apart from blocks that are only predicated due to tail folding.
inline unsigned
getPredBlockCostDivisor(TargetTransformInfo::TargetCostKind CostKind,
- BasicBlock *BB) const {
- // If a block wasn't originally predicated but was predicated due to
----------------
lukel97 wrote:
I've moved part of this explanation for tail folded loops back into the definition in 6ee702b1052b
https://github.com/llvm/llvm-project/pull/158690
More information about the llvm-commits
mailing list