From 903d46032054ecb363f0a3264d5526fdfb6a0af9 Mon Sep 17 00:00:00 2001 From: Philip Reames Date: Wed, 7 May 2025 07:45:03 -0700 Subject: [PATCH] [IR] Remove MemSetPatternIntrinsic class [nfc] This class appears to serve no purpose. It looks to be modeled after the MemIntrinsic/MemTransferInst family of classes, but right now, we only have a single intrinsic in this "family". --- llvm/include/llvm/IR/IntrinsicInst.h | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/llvm/include/llvm/IR/IntrinsicInst.h b/llvm/include/llvm/IR/IntrinsicInst.h index ea9257bd0d95b..1217a628dcb29 100644 --- a/llvm/include/llvm/IR/IntrinsicInst.h +++ b/llvm/include/llvm/IR/IntrinsicInst.h @@ -1167,8 +1167,10 @@ class MemSetInst : public MemSetBase { } }; -/// This is the base class for llvm.experimental.memset.pattern -class MemSetPatternIntrinsic : public MemIntrinsicBase { +/// This class wraps the llvm.experimental.memset.pattern intrinsic. +/// Note that despite the inheritance, this is not part of the +/// MemIntrinsic hierachy in terms of isa/cast. +class MemSetPatternInst : public MemSetBase { private: enum { ARG_VOLATILE = 3 }; @@ -1181,18 +1183,6 @@ class MemSetPatternIntrinsic : public MemIntrinsicBase { void setVolatile(Constant *V) { setArgOperand(ARG_VOLATILE, V); } - // Methods for support of type inquiry through isa, cast, and dyn_cast: - static bool classof(const IntrinsicInst *I) { - return I->getIntrinsicID() == Intrinsic::experimental_memset_pattern; - } - static bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -/// This class wraps the llvm.experimental.memset.pattern intrinsic. -class MemSetPatternInst : public MemSetBase { -public: // Methods for support type inquiry through isa, cast, and dyn_cast: static bool classof(const IntrinsicInst *I) { return I->getIntrinsicID() == Intrinsic::experimental_memset_pattern;