[llvm] [VPlan] Move call widening decision to VPlan. (NFCI) (PR #195518)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sun May 3 04:29:52 PDT 2026
================
@@ -5858,6 +5864,32 @@ uint64_t VPCostContext::getPredBlockCostDivisor(BasicBlock *BB) const {
return CM.getPredBlockCostDivisor(CostKind, BB);
}
+bool VPCostContext::willBeScalarized(Instruction *I, ElementCount VF) const {
+ return CM.isScalarWithPredication(I, VF) ||
+ CM.isUniformAfterVectorization(I, VF) || CM.isForcedScalar(I, VF) ||
+ (VF.isVector() && CM.isProfitableToScalarize(I, VF));
+}
+
+bool VPCostContext::isMaskRequired(Instruction *I) const {
+ return CM.isMaskRequired(I);
+}
+
+std::optional<VPCostContext::CallWideningKind>
+VPCostContext::getLegacyCallKind(CallInst *CI, ElementCount VF) const {
----------------
fhahn wrote:
note this is temporary to assert the decisions between legacy and VPlan transform match
https://github.com/llvm/llvm-project/pull/195518
More information about the llvm-commits
mailing list