[llvm] [VPlan] First step towards VPlan cost modeling (LegacyCM in CostCtx) (PR #92555)

via llvm-commits llvm-commits at lists.llvm.org
Tue May 28 02:36:37 PDT 2024


================
@@ -664,6 +676,9 @@ class VPBlockBase {
   /// the cloned recipes, including all blocks in the single-entry single-exit
   /// region for VPRegionBlocks.
   virtual VPBlockBase *clone() = 0;
+
+  /// Compute the cost of the block.
+  virtual InstructionCost cost(ElementCount VF, VPCostContext &Ctx) = 0;
----------------
ayalz wrote:

nit: better place all `cost()` methods next to `execute()`, as done in VPRecipeBase.

https://github.com/llvm/llvm-project/pull/92555


More information about the llvm-commits mailing list