@@ -1122,9 +1122,9 @@ class VPPhiAccessors {
11221122 return getAsRecipe ()->getNumOperands ();
11231123 }
11241124
1125- // / Removes the incoming value corresponding to \p IncomingBlock, which must
1126- // / be a predecessor.
1127- void removeIncomingValue (VPBlockBase *IncomingBlock) const ;
1125+ // / Removes the incoming value for \p IncomingBlock, which must be a
1126+ // / predecessor.
1127+ void removeIncomingValueFor (VPBlockBase *IncomingBlock) const ;
11281128
11291129#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
11301130 // / Print the recipe.
@@ -3530,22 +3530,22 @@ class VPScalarIVStepsRecipe : public VPRecipeWithIRFlags,
35303530
35313531// / Casting from VPRecipeBase -> VPPhiAccessors is supported for all recipe
35323532// / types implementing VPPhiAccessors. Used by isa<> & co.
3533- template <> struct CastIsPossible <VPPhiAccessors, const VPRecipeBase * > {
3534- static inline bool isPossible (const VPRecipeBase * f) {
3533+ template <typename SrcTy > struct CastIsPossible <VPPhiAccessors, SrcTy > {
3534+ static inline bool isPossible (SrcTy f) {
35353535 // TODO: include VPPredInstPHIRecipe too, once it implements VPPhiAccessors.
35363536 return isa<VPIRPhi, VPHeaderPHIRecipe, VPWidenPHIRecipe, VPPhi>(f);
35373537 }
35383538};
35393539// / Support casting from VPRecipeBase -> VPPhiAccessors, by down-casting to the
35403540// / recipe types implementing VPPhiAccessors. Used by cast<>, dyn_cast<> & co.
3541- template <>
3542- struct CastInfo <VPPhiAccessors, const VPRecipeBase * >
3543- : public CastIsPossible<VPPhiAccessors, const VPRecipeBase * > {
3541+ template <typename SrcTy >
3542+ struct CastInfo <VPPhiAccessors, SrcTy >
3543+ : public CastIsPossible<VPPhiAccessors, SrcTy > {
35443544
3545- using Self = CastInfo<VPPhiAccessors, const VPRecipeBase * >;
3545+ using Self = CastInfo<VPPhiAccessors, SrcTy >;
35463546
35473547 // / doCast is used by cast<>.
3548- static inline VPPhiAccessors *doCast (const VPRecipeBase * R) {
3548+ static inline VPPhiAccessors *doCast (SrcTy R) {
35493549 return const_cast <VPPhiAccessors *>([R]() -> const VPPhiAccessors * {
35503550 switch (R->getVPDefID ()) {
35513551 case VPDef::VPInstructionSC:
@@ -3561,7 +3561,7 @@ struct CastInfo<VPPhiAccessors, const VPRecipeBase *>
35613561 }
35623562
35633563 // / doCastIfPossible is used by dyn_cast<>.
3564- static inline VPPhiAccessors *doCastIfPossible (const VPRecipeBase * f) {
3564+ static inline VPPhiAccessors *doCastIfPossible (SrcTy f) {
35653565 if (!Self::isPossible (f))
35663566 return nullptr ;
35673567 return doCast (f);
0 commit comments