[llvm] [VPlan] Compute scalar cost based on VPlan0 instead of legacy CM. (PR #196845)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 07:46:34 PDT 2026
================
@@ -1945,17 +1945,19 @@ bool VPCostContext::isFreeScalarIntrinsic(Intrinsic::ID ID) {
ID);
}
-uint64_t VPCostContext::getReplicateRegionCostDivisor(
- const VPRegionBlock *Region) const {
- if (CostKind == TTI::TCK_CodeSize)
- return 1;
- std::optional<VPExecutionFrequency> Freq =
- Region->getEntryBranchOnMask()->getExecutionFrequency();
- if (!Freq)
+uint64_t
+VPCostContext::getCostDivisor(std::optional<VPExecutionFrequency> Freq) const {
----------------
fhahn wrote:
Done in https://github.com/llvm/llvm-project/pull/225413. It also inline it instead of having a trivial `getReplicateRegionCostDivisor`, thanks
https://github.com/llvm/llvm-project/pull/196845
More information about the llvm-commits
mailing list