@@ -386,10 +386,6 @@ class VPRecipeBase : public ilist_node_with_parent<VPRecipeBase, VPBasicBlock>,
386386 DebugLoc DL = {})
387387 : VPDef(SC), VPUser(Operands), DL(DL) {}
388388
389- template <typename IterT>
390- VPRecipeBase (const unsigned char SC, iterator_range<IterT> Operands,
391- DebugLoc DL = {})
392- : VPDef(SC), VPUser(Operands), DL(DL) {}
393389 virtual ~VPRecipeBase () = default ;
394390
395391 // / Clone the current recipe.
@@ -504,17 +500,12 @@ class VPRecipeBase : public ilist_node_with_parent<VPRecipeBase, VPBasicBlock>,
504500// / Note that VPRecipeBase must be inherited from before VPValue.
505501class VPSingleDefRecipe : public VPRecipeBase , public VPValue {
506502public:
507- template <typename IterT>
508- VPSingleDefRecipe (const unsigned char SC, IterT Operands, DebugLoc DL = {})
509- : VPRecipeBase(SC, Operands, DL), VPValue(this ) {}
510-
511503 VPSingleDefRecipe (const unsigned char SC, ArrayRef<VPValue *> Operands,
512504 DebugLoc DL = {})
513505 : VPRecipeBase(SC, Operands, DL), VPValue(this ) {}
514506
515- template <typename IterT>
516- VPSingleDefRecipe (const unsigned char SC, IterT Operands, Value *UV,
517- DebugLoc DL = {})
507+ VPSingleDefRecipe (const unsigned char SC, ArrayRef<VPValue *> Operands,
508+ Value *UV, DebugLoc DL = {})
518509 : VPRecipeBase(SC, Operands, DL), VPValue(this , UV) {}
519510
520511 static inline bool classof (const VPRecipeBase *R) {
@@ -648,15 +639,15 @@ class VPRecipeWithIRFlags : public VPSingleDefRecipe {
648639 }
649640
650641public:
651- template < typename IterT>
652- VPRecipeWithIRFlags ( const unsigned char SC, IterT Operands, DebugLoc DL = {})
642+ VPRecipeWithIRFlags ( const unsigned char SC, ArrayRef<VPValue *> Operands,
643+ DebugLoc DL = {})
653644 : VPSingleDefRecipe(SC, Operands, DL) {
654645 OpType = OperationType::Other;
655646 AllFlags = 0 ;
656647 }
657648
658- template < typename IterT>
659- VPRecipeWithIRFlags ( const unsigned char SC, IterT Operands, Instruction &I)
649+ VPRecipeWithIRFlags ( const unsigned char SC, ArrayRef<VPValue *> Operands,
650+ Instruction &I)
660651 : VPSingleDefRecipe(SC, Operands, &I, I.getDebugLoc()) {
661652 if (auto *Op = dyn_cast<CmpInst>(&I)) {
662653 OpType = OperationType::Cmp;
@@ -685,33 +676,28 @@ class VPRecipeWithIRFlags : public VPSingleDefRecipe {
685676 }
686677 }
687678
688- template <typename IterT>
689- VPRecipeWithIRFlags (const unsigned char SC, IterT Operands,
679+ VPRecipeWithIRFlags (const unsigned char SC, ArrayRef<VPValue *> Operands,
690680 CmpInst::Predicate Pred, DebugLoc DL = {})
691681 : VPSingleDefRecipe(SC, Operands, DL), OpType(OperationType::Cmp),
692682 CmpPredicate (Pred) {}
693683
694- template <typename IterT>
695- VPRecipeWithIRFlags (const unsigned char SC, IterT Operands,
684+ VPRecipeWithIRFlags (const unsigned char SC, ArrayRef<VPValue *> Operands,
696685 WrapFlagsTy WrapFlags, DebugLoc DL = {})
697686 : VPSingleDefRecipe(SC, Operands, DL),
698687 OpType(OperationType::OverflowingBinOp), WrapFlags(WrapFlags) {}
699688
700- template <typename IterT>
701- VPRecipeWithIRFlags (const unsigned char SC, IterT Operands,
689+ VPRecipeWithIRFlags (const unsigned char SC, ArrayRef<VPValue *> Operands,
702690 FastMathFlags FMFs, DebugLoc DL = {})
703691 : VPSingleDefRecipe(SC, Operands, DL), OpType(OperationType::FPMathOp),
704692 FMFs(FMFs) {}
705693
706- template <typename IterT>
707- VPRecipeWithIRFlags (const unsigned char SC, IterT Operands,
694+ VPRecipeWithIRFlags (const unsigned char SC, ArrayRef<VPValue *> Operands,
708695 DisjointFlagsTy DisjointFlags, DebugLoc DL = {})
709696 : VPSingleDefRecipe(SC, Operands, DL), OpType(OperationType::DisjointOp),
710697 DisjointFlags(DisjointFlags) {}
711698
712699protected:
713- template <typename IterT>
714- VPRecipeWithIRFlags (const unsigned char SC, IterT Operands,
700+ VPRecipeWithIRFlags (const unsigned char SC, ArrayRef<VPValue *> Operands,
715701 GEPNoWrapFlags GEPFlags, DebugLoc DL = {})
716702 : VPSingleDefRecipe(SC, Operands, DL), OpType(OperationType::GEPOp),
717703 GEPFlags(GEPFlags) {}
@@ -1225,15 +1211,13 @@ class VPWidenRecipe : public VPRecipeWithIRFlags, public VPIRMetadata {
12251211 unsigned Opcode;
12261212
12271213protected:
1228- template <typename IterT>
12291214 VPWidenRecipe (unsigned VPDefOpcode, Instruction &I,
1230- iterator_range<IterT > Operands)
1215+ ArrayRef<VPValue * > Operands)
12311216 : VPRecipeWithIRFlags(VPDefOpcode, Operands, I), VPIRMetadata(I),
12321217 Opcode (I.getOpcode()) {}
12331218
12341219public:
1235- template <typename IterT>
1236- VPWidenRecipe (Instruction &I, iterator_range<IterT> Operands)
1220+ VPWidenRecipe (Instruction &I, ArrayRef<VPValue *> Operands)
12371221 : VPWidenRecipe(VPDef::VPWidenSC, I, Operands) {}
12381222
12391223 ~VPWidenRecipe () override = default ;
@@ -1466,8 +1450,7 @@ class VPHistogramRecipe : public VPRecipeBase {
14661450 unsigned Opcode;
14671451
14681452public:
1469- template <typename IterT>
1470- VPHistogramRecipe (unsigned Opcode, iterator_range<IterT> Operands,
1453+ VPHistogramRecipe (unsigned Opcode, ArrayRef<VPValue *> Operands,
14711454 DebugLoc DL = {})
14721455 : VPRecipeBase(VPDef::VPHistogramSC, Operands, DL), Opcode(Opcode) {}
14731456
@@ -1503,8 +1486,7 @@ class VPHistogramRecipe : public VPRecipeBase {
15031486
15041487// / A recipe for widening select instructions.
15051488struct VPWidenSelectRecipe : public VPRecipeWithIRFlags , public VPIRMetadata {
1506- template <typename IterT>
1507- VPWidenSelectRecipe (SelectInst &I, iterator_range<IterT> Operands)
1489+ VPWidenSelectRecipe (SelectInst &I, ArrayRef<VPValue *> Operands)
15081490 : VPRecipeWithIRFlags(VPDef::VPWidenSelectSC, Operands, I),
15091491 VPIRMetadata (I) {}
15101492
@@ -1563,8 +1545,7 @@ class VPWidenGEPRecipe : public VPRecipeWithIRFlags {
15631545 }
15641546
15651547public:
1566- template <typename IterT>
1567- VPWidenGEPRecipe (GetElementPtrInst *GEP, iterator_range<IterT> Operands)
1548+ VPWidenGEPRecipe (GetElementPtrInst *GEP, ArrayRef<VPValue *> Operands)
15681549 : VPRecipeWithIRFlags(VPDef::VPWidenGEPSC, Operands, *GEP) {
15691550 SmallVector<std::pair<unsigned , MDNode *>> Metadata;
15701551 (void )Metadata;
@@ -2489,8 +2470,7 @@ class VPReplicateRecipe : public VPRecipeWithIRFlags {
24892470 bool IsPredicated;
24902471
24912472public:
2492- template <typename IterT>
2493- VPReplicateRecipe (Instruction *I, iterator_range<IterT> Operands,
2473+ VPReplicateRecipe (Instruction *I, ArrayRef<VPValue *> Operands,
24942474 bool IsUniform, VPValue *Mask = nullptr )
24952475 : VPRecipeWithIRFlags(VPDef::VPReplicateSC, Operands, *I),
24962476 IsUniform (IsUniform), IsPredicated(Mask) {
0 commit comments