@@ -911,10 +911,6 @@ class VPSingleDefRecipe : public VPRecipeBase, public VPValue {
911911 return cast<Instruction>(getUnderlyingValue ());
912912 }
913913
914- // / Return the cost of this VPSingleDefRecipe.
915- InstructionCost computeCost (ElementCount VF,
916- VPCostContext &Ctx) const override ;
917-
918914#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
919915 // / Print this VPSingleDefRecipe to dbgs() (for debugging).
920916 LLVM_DUMP_METHOD void dump () const ;
@@ -1323,6 +1319,13 @@ class VPInstruction : public VPRecipeWithIRFlags,
13231319 // / provided.
13241320 void execute (VPTransformState &State) override ;
13251321
1322+ // / Return the cost of this VPInstruction.
1323+ InstructionCost computeCost (ElementCount VF,
1324+ VPCostContext &Ctx) const override {
1325+ // TODO: Compute accurate cost after retiring the legacy cost model.
1326+ return 0 ;
1327+ }
1328+
13261329#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
13271330 // / Print the VPInstruction to \p O.
13281331 void print (raw_ostream &O, const Twine &Indent,
@@ -1605,6 +1608,13 @@ class VPScalarCastRecipe : public VPSingleDefRecipe {
16051608
16061609 void execute (VPTransformState &State) override ;
16071610
1611+ // / Return the cost of this VPScalarCastRecipe.
1612+ InstructionCost computeCost (ElementCount VF,
1613+ VPCostContext &Ctx) const override {
1614+ // TODO: Compute accurate cost after retiring the legacy cost model.
1615+ return 0 ;
1616+ }
1617+
16081618#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
16091619 void print (raw_ostream &O, const Twine &Indent,
16101620 VPSlotTracker &SlotTracker) const override ;
@@ -1872,6 +1882,13 @@ class VPWidenGEPRecipe : public VPRecipeWithIRFlags {
18721882 // / Generate the gep nodes.
18731883 void execute (VPTransformState &State) override ;
18741884
1885+ // / Return the cost of this VPWidenGEPRecipe.
1886+ InstructionCost computeCost (ElementCount VF,
1887+ VPCostContext &Ctx) const override {
1888+ // TODO: Compute accurate cost after retiring the legacy cost model.
1889+ return 0 ;
1890+ }
1891+
18751892#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
18761893 // / Print the recipe.
18771894 void print (raw_ostream &O, const Twine &Indent,
@@ -1906,6 +1923,13 @@ class VPReverseVectorPointerRecipe : public VPRecipeWithIRFlags,
19061923 return true ;
19071924 }
19081925
1926+ // / Return the cost of this VPVectorPointerRecipe.
1927+ InstructionCost computeCost (ElementCount VF,
1928+ VPCostContext &Ctx) const override {
1929+ // TODO: Compute accurate cost after retiring the legacy cost model.
1930+ return 0 ;
1931+ }
1932+
19091933 // / Returns true if the recipe only uses the first part of operand \p Op.
19101934 bool onlyFirstPartUsed (const VPValue *Op) const override {
19111935 assert (is_contained (operands (), Op) &&
@@ -1961,6 +1985,13 @@ class VPVectorPointerRecipe : public VPRecipeWithIRFlags,
19611985 getDebugLoc ());
19621986 }
19631987
1988+ // / Return the cost of this VPHeaderPHIRecipe.
1989+ InstructionCost computeCost (ElementCount VF,
1990+ VPCostContext &Ctx) const override {
1991+ // TODO: Compute accurate cost after retiring the legacy cost model.
1992+ return 0 ;
1993+ }
1994+
19641995#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
19651996 // / Print the recipe.
19661997 void print (raw_ostream &O, const Twine &Indent,
@@ -2655,6 +2686,10 @@ class VPReplicateRecipe : public VPRecipeWithIRFlags {
26552686 // / the \p State.
26562687 void execute(VPTransformState &State) override ;
26572688
2689+ // / Return the cost of this VPReplicateRecipe.
2690+ InstructionCost computeCost (ElementCount VF,
2691+ VPCostContext &Ctx) const override ;
2692+
26582693#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
26592694 // / Print the recipe.
26602695 void print (raw_ostream &O, const Twine &Indent,
@@ -2767,6 +2802,13 @@ class VPPredInstPHIRecipe : public VPSingleDefRecipe {
27672802 // / retain SSA form.
27682803 void execute (VPTransformState &State) override ;
27692804
2805+ // / Return the cost of this VPPredInstPHIRecipe.
2806+ InstructionCost computeCost (ElementCount VF,
2807+ VPCostContext &Ctx) const override {
2808+ // TODO: Compute accurate cost after retiring the legacy cost model.
2809+ return 0 ;
2810+ }
2811+
27702812#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
27712813 // / Print the recipe.
27722814 void print (raw_ostream &O, const Twine &Indent,
@@ -3046,6 +3088,13 @@ class VPExpandSCEVRecipe : public VPSingleDefRecipe {
30463088 // / Generate a canonical vector induction variable of the vector loop, with
30473089 void execute (VPTransformState &State) override ;
30483090
3091+ // / Return the cost of this VPExpandSCEVRecipe.
3092+ InstructionCost computeCost (ElementCount VF,
3093+ VPCostContext &Ctx) const override {
3094+ // TODO: Compute accurate cost after retiring the legacy cost model.
3095+ return 0 ;
3096+ }
3097+
30493098#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
30503099 // / Print the recipe.
30513100 void print (raw_ostream &O, const Twine &Indent,
@@ -3221,6 +3270,13 @@ class VPWidenCanonicalIVRecipe : public VPSingleDefRecipe,
32213270 // / step = <VF*UF, VF*UF, ..., VF*UF>.
32223271 void execute (VPTransformState &State) override ;
32233272
3273+ // / Return the cost of this VPWidenCanonicalIVPHIRecipe.
3274+ InstructionCost computeCost (ElementCount VF,
3275+ VPCostContext &Ctx) const override {
3276+ // TODO: Compute accurate cost after retiring the legacy cost model.
3277+ return 0 ;
3278+ }
3279+
32243280#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
32253281 // / Print the recipe.
32263282 void print (raw_ostream &O, const Twine &Indent,
@@ -3265,6 +3321,13 @@ class VPDerivedIVRecipe : public VPSingleDefRecipe {
32653321 // / operand) + IV (2. operand) * StepValue (3, operand).
32663322 void execute (VPTransformState &State) override ;
32673323
3324+ // / Return the cost of this VPDerivedIVRecipe.
3325+ InstructionCost computeCost (ElementCount VF,
3326+ VPCostContext &Ctx) const override {
3327+ // TODO: Compute accurate cost after retiring the legacy cost model.
3328+ return 0 ;
3329+ }
3330+
32683331#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
32693332 // / Print the recipe.
32703333 void print (raw_ostream &O, const Twine &Indent,
@@ -3320,6 +3383,13 @@ class VPScalarIVStepsRecipe : public VPRecipeWithIRFlags,
33203383 // / Generate the scalarized versions of the phi node as needed by their users.
33213384 void execute(VPTransformState &State) override ;
33223385
3386+ // / Return the cost of this VPScalarIVStepsRecipe.
3387+ InstructionCost computeCost (ElementCount VF,
3388+ VPCostContext &Ctx) const override {
3389+ // TODO: Compute accurate cost after retiring the legacy cost model.
3390+ return 0 ;
3391+ }
3392+
33233393#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
33243394 // / Print the recipe.
33253395 void print (raw_ostream &O, const Twine &Indent,
0 commit comments