[llvm] 78e5734 - [IR] Remove MemSetPatternIntrinsic class [nfc] (#138888)
via llvm-commits
llvm-commits at lists.llvm.org
Thu May 8 07:25:30 PDT 2025
Author: Philip Reames
Date: 2025-05-08T07:25:26-07:00
New Revision: 78e573499eb3bc0200db462c356a6523e6ba8000
URL: https://github.com/llvm/llvm-project/commit/78e573499eb3bc0200db462c356a6523e6ba8000
DIFF: https://github.com/llvm/llvm-project/commit/78e573499eb3bc0200db462c356a6523e6ba8000.diff
LOG: [IR] Remove MemSetPatternIntrinsic class [nfc] (#138888)
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".
Added:
Modified:
llvm/include/llvm/IR/IntrinsicInst.h
Removed:
################################################################################
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<MemIntrinsic> {
}
};
-/// This is the base class for llvm.experimental.memset.pattern
-class MemSetPatternIntrinsic : public MemIntrinsicBase<MemIntrinsic> {
+/// 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<MemIntrinsic> {
private:
enum { ARG_VOLATILE = 3 };
@@ -1181,18 +1183,6 @@ class MemSetPatternIntrinsic : public MemIntrinsicBase<MemIntrinsic> {
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<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
- }
-};
-
-/// This class wraps the llvm.experimental.memset.pattern intrinsic.
-class MemSetPatternInst : public MemSetBase<MemSetPatternIntrinsic> {
-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;
More information about the llvm-commits
mailing list