From ce1be13a868d0f8afa367975558c1a6175cce33a Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Mon, 2 Jan 2023 17:52:12 +0000 Subject: [PATCH] [VPlan] Use VP_CLASSOF_IMPL for VPWidenCanonicalIVRecipe(NFC). Replace VPWidenCanonicalIVRecipe::classof implementation with general VP_CLASSOF_IMPL. --- llvm/lib/Transforms/Vectorize/VPlan.h | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h index 9d38b4d..cbd47de 100644 --- a/llvm/lib/Transforms/Vectorize/VPlan.h +++ b/llvm/lib/Transforms/Vectorize/VPlan.h @@ -1874,20 +1874,8 @@ public: ~VPWidenCanonicalIVRecipe() override = default; - /// Method to support type inquiry through isa, cast, and dyn_cast. - static inline bool classof(const VPDef *D) { - return D->getVPDefID() == VPRecipeBase::VPWidenCanonicalIVSC; - } - - /// Extra classof implementations to allow directly casting from VPUser -> - /// VPWidenCanonicalIVRecipe. - static inline bool classof(const VPUser *U) { - auto *R = dyn_cast(U); - return R && R->getVPDefID() == VPRecipeBase::VPWidenCanonicalIVSC; - } - static inline bool classof(const VPRecipeBase *R) { - return R->getVPDefID() == VPRecipeBase::VPWidenCanonicalIVSC; - } + VP_CLASSOF_IMPL(VPRecipeBase::VPWidenCanonicalIVSC, + VPValue::VPVWidenCanonicalIVSC) /// Generate a canonical vector induction variable of the vector loop, with /// start = { for 0 <= Part < UF}, and -- 2.7.4