[llvm] [VPlan] Use BlockFrequencyInfo in getPredBlockCostDivisor (PR #158690)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 10 10:19:10 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
----------------
david-arm wrote:
I think this comment needs moving to the new location as well.
https://github.com/llvm/llvm-project/pull/158690
More information about the llvm-commits
mailing list