[llvm] [VPlan] First step towards VPlan cost modeling (LegacyCM in CostCtx) (PR #92555)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 2 07:47:38 PDT 2024
================
@@ -253,6 +254,40 @@ void VPRecipeBase::moveBefore(VPBasicBlock &BB,
insertBefore(BB, I);
}
+InstructionCost VPRecipeBase::cost(ElementCount VF, VPCostContext &Ctx) {
+ if (auto *S = dyn_cast<VPSingleDefRecipe>(this)) {
+ auto *UI = dyn_cast_or_null<Instruction>(S->getUnderlyingValue());
----------------
ayalz wrote:
Note that other types of recipes associated with underlying instructions (dealt with below in VPRecipeBase::computeCost()), namely interleave-group and widen-memory, are irrelevant for skipping cost.
https://github.com/llvm/llvm-project/pull/92555
More information about the llvm-commits
mailing list