@@ -911,10 +911,6 @@ class VPSingleDefRecipe : public VPRecipeBase, public VPValue {
911
911
return cast<Instruction>(getUnderlyingValue ());
912
912
}
913
913
914
- // / Return the cost of this VPSingleDefRecipe.
915
- InstructionCost computeCost (ElementCount VF,
916
- VPCostContext &Ctx) const override ;
917
-
918
914
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
919
915
// / Print this VPSingleDefRecipe to dbgs() (for debugging).
920
916
LLVM_DUMP_METHOD void dump () const ;
@@ -1323,6 +1319,13 @@ class VPInstruction : public VPRecipeWithIRFlags,
1323
1319
// / provided.
1324
1320
void execute (VPTransformState &State) override ;
1325
1321
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
+
1326
1329
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
1327
1330
// / Print the VPInstruction to \p O.
1328
1331
void print (raw_ostream &O, const Twine &Indent,
@@ -1605,6 +1608,13 @@ class VPScalarCastRecipe : public VPSingleDefRecipe {
1605
1608
1606
1609
void execute (VPTransformState &State) override ;
1607
1610
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
+
1608
1618
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
1609
1619
void print (raw_ostream &O, const Twine &Indent,
1610
1620
VPSlotTracker &SlotTracker) const override ;
@@ -1872,6 +1882,13 @@ class VPWidenGEPRecipe : public VPRecipeWithIRFlags {
1872
1882
// / Generate the gep nodes.
1873
1883
void execute (VPTransformState &State) override ;
1874
1884
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
+
1875
1892
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
1876
1893
// / Print the recipe.
1877
1894
void print (raw_ostream &O, const Twine &Indent,
@@ -1906,6 +1923,13 @@ class VPReverseVectorPointerRecipe : public VPRecipeWithIRFlags,
1906
1923
return true ;
1907
1924
}
1908
1925
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
+
1909
1933
// / Returns true if the recipe only uses the first part of operand \p Op.
1910
1934
bool onlyFirstPartUsed (const VPValue *Op) const override {
1911
1935
assert (is_contained (operands (), Op) &&
@@ -1961,6 +1985,13 @@ class VPVectorPointerRecipe : public VPRecipeWithIRFlags,
1961
1985
getDebugLoc ());
1962
1986
}
1963
1987
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
+
1964
1995
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
1965
1996
// / Print the recipe.
1966
1997
void print (raw_ostream &O, const Twine &Indent,
@@ -2655,6 +2686,10 @@ class VPReplicateRecipe : public VPRecipeWithIRFlags {
2655
2686
// / the \p State.
2656
2687
void execute(VPTransformState &State) override ;
2657
2688
2689
+ // / Return the cost of this VPReplicateRecipe.
2690
+ InstructionCost computeCost (ElementCount VF,
2691
+ VPCostContext &Ctx) const override ;
2692
+
2658
2693
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
2659
2694
// / Print the recipe.
2660
2695
void print (raw_ostream &O, const Twine &Indent,
@@ -2767,6 +2802,13 @@ class VPPredInstPHIRecipe : public VPSingleDefRecipe {
2767
2802
// / retain SSA form.
2768
2803
void execute (VPTransformState &State) override ;
2769
2804
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
+
2770
2812
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
2771
2813
// / Print the recipe.
2772
2814
void print (raw_ostream &O, const Twine &Indent,
@@ -3046,6 +3088,13 @@ class VPExpandSCEVRecipe : public VPSingleDefRecipe {
3046
3088
// / Generate a canonical vector induction variable of the vector loop, with
3047
3089
void execute (VPTransformState &State) override ;
3048
3090
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
+
3049
3098
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
3050
3099
// / Print the recipe.
3051
3100
void print (raw_ostream &O, const Twine &Indent,
@@ -3221,6 +3270,13 @@ class VPWidenCanonicalIVRecipe : public VPSingleDefRecipe,
3221
3270
// / step = <VF*UF, VF*UF, ..., VF*UF>.
3222
3271
void execute (VPTransformState &State) override ;
3223
3272
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
+
3224
3280
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
3225
3281
// / Print the recipe.
3226
3282
void print (raw_ostream &O, const Twine &Indent,
@@ -3265,6 +3321,13 @@ class VPDerivedIVRecipe : public VPSingleDefRecipe {
3265
3321
// / operand) + IV (2. operand) * StepValue (3, operand).
3266
3322
void execute (VPTransformState &State) override ;
3267
3323
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
+
3268
3331
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
3269
3332
// / Print the recipe.
3270
3333
void print (raw_ostream &O, const Twine &Indent,
@@ -3320,6 +3383,13 @@ class VPScalarIVStepsRecipe : public VPRecipeWithIRFlags,
3320
3383
// / Generate the scalarized versions of the phi node as needed by their users.
3321
3384
void execute(VPTransformState &State) override ;
3322
3385
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
+
3323
3393
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
3324
3394
// / Print the recipe.
3325
3395
void print (raw_ostream &O, const Twine &Indent,
0 commit comments