-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[IR] Remove MemSetPatternIntrinsic class [nfc] #138888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IR] Remove MemSetPatternIntrinsic class [nfc] #138888
Conversation
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/pr-subscribers-llvm-ir Author: Philip Reames (preames) ChangesThis 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". Full diff: https://github.com/llvm/llvm-project/pull/138888.diff 1 Files Affected:
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;
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/21922 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/19669 Here is the relevant piece of the build log for the reference
|
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".