[llvm] [VPlan] First step towards VPlan cost modeling. (PR #92555)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 10 14:33:20 PDT 2024
================
@@ -747,6 +747,66 @@ void VPRegionBlock::execute(VPTransformState *State) {
State->Instance.reset();
}
+InstructionCost VPBasicBlock::cost(ElementCount VF, VPCostContext &Ctx) {
+ InstructionCost Cost = 0;
+ for (VPRecipeBase &R : Recipes)
+ Cost += R.cost(VF, Ctx);
+ return Cost;
+}
+
+InstructionCost VPRegionBlock::cost(ElementCount VF, VPCostContext &Ctx) {
+ InstructionCost Cost = 0;
+ if (!isReplicator()) {
----------------
fhahn wrote:
Updated, thanks!
https://github.com/llvm/llvm-project/pull/92555
More information about the llvm-commits
mailing list