[llvm] [VPlan] Factor out logic to common compute costs to helper (NFCI). (PR #153361)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 18 03:53:00 PDT 2025


================
@@ -898,6 +898,13 @@ struct VPRecipeWithIRFlags : public VPSingleDefRecipe, public VPIRFlags {
   }
 
   void execute(VPTransformState &State) override = 0;
+
+  /// Compute the cost for this recipe using \p Opcode. If \p IsVector is true,
----------------
fhahn wrote:

I updated the function to just take an VF argument, and set it to 1 if we compute the scalar cost.

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


More information about the llvm-commits mailing list