[VPlan] Remove unneeded VPUser::classof(const VPDef *) (NFC).
authorFlorian Hahn <flo@fhahn.com>
Tue, 17 Jan 2023 09:08:33 +0000 (09:08 +0000)
committerFlorian Hahn <flo@fhahn.com>
Tue, 17 Jan 2023 09:08:33 +0000 (09:08 +0000)
This specialization is not needed any longer as VPRecipeBase inherits
from VPUser and getDefiningRecipe returns a VPRecipeBase.

llvm/lib/Transforms/Vectorize/VPlan.h
llvm/lib/Transforms/Vectorize/VPlanValue.h

index 595ca2d..ed64562 100644 (file)
@@ -755,20 +755,6 @@ public:
   }
 };
 
-inline bool VPUser::classof(const VPDef *Def) {
-  return Def->getVPDefID() == VPDef::VPInstructionSC ||
-         Def->getVPDefID() == VPDef::VPWidenSC ||
-         Def->getVPDefID() == VPDef::VPWidenCallSC ||
-         Def->getVPDefID() == VPDef::VPWidenSelectSC ||
-         Def->getVPDefID() == VPDef::VPWidenGEPSC ||
-         Def->getVPDefID() == VPDef::VPBlendSC ||
-         Def->getVPDefID() == VPDef::VPInterleaveSC ||
-         Def->getVPDefID() == VPDef::VPReplicateSC ||
-         Def->getVPDefID() == VPDef::VPReductionSC ||
-         Def->getVPDefID() == VPDef::VPBranchOnMaskSC ||
-         Def->getVPDefID() == VPDef::VPWidenMemoryInstructionSC;
-}
-
 // Helper macro to define common classof implementations for recipes.
 #define VP_CLASSOF_IMPL(VPDefID, VPValueID)                                    \
   static inline bool classof(const VPDef *D) {                                 \
index 655f52a..dce88fb 100644 (file)
@@ -298,9 +298,6 @@ public:
     return const_operand_range(op_begin(), op_end());
   }
 
-  /// Method to support type inquiry through isa, cast, and dyn_cast.
-  static inline bool classof(const VPDef *Recipe);
-
   /// Returns true if the VPUser uses scalars of operand \p Op. Conservatively
   /// returns if only first (scalar) lane is used, as default.
   virtual bool usesScalars(const VPValue *Op) const {