[llvm] 133f017 - [VPlan] Remove unneeded VPUser::classof(const VPDef *) (NFC).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 17 01:08:44 PST 2023
Author: Florian Hahn
Date: 2023-01-17T09:08:33Z
New Revision: 133f017479cc1f3c072986e43494b3820d928971
URL: https://github.com/llvm/llvm-project/commit/133f017479cc1f3c072986e43494b3820d928971
DIFF: https://github.com/llvm/llvm-project/commit/133f017479cc1f3c072986e43494b3820d928971.diff
LOG: [VPlan] Remove unneeded VPUser::classof(const VPDef *) (NFC).
This specialization is not needed any longer as VPRecipeBase inherits
from VPUser and getDefiningRecipe returns a VPRecipeBase.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlan.h
llvm/lib/Transforms/Vectorize/VPlanValue.h
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 595ca2d629c50..ed6456203edd1 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -755,20 +755,6 @@ class VPRecipeBase : public ilist_node_with_parent<VPRecipeBase, VPBasicBlock>,
}
};
-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) { \
diff --git a/llvm/lib/Transforms/Vectorize/VPlanValue.h b/llvm/lib/Transforms/Vectorize/VPlanValue.h
index 655f52a1ff632..dce88fb0ed9a3 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanValue.h
+++ b/llvm/lib/Transforms/Vectorize/VPlanValue.h
@@ -298,9 +298,6 @@ class VPUser {
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 {
More information about the llvm-commits
mailing list