[llvm] [NFC] Add GIntrinsic::setIntrinsicID (PR #106236)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 27 09:33:03 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-globalisel
Author: Rahul Joshi (jurahul)
<details>
<summary>Changes</summary>
Add a function to set the intrinsic ID for GIntrinsic.
---
Full diff: https://github.com/llvm/llvm-project/pull/106236.diff
1 Files Affected:
- (modified) llvm/include/llvm/CodeGen/GlobalISel/GenericMachineInstrs.h (+3)
``````````diff
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/GenericMachineInstrs.h b/llvm/include/llvm/CodeGen/GlobalISel/GenericMachineInstrs.h
index ef1171d9f1f64d..9911d7dfaf6400 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/GenericMachineInstrs.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/GenericMachineInstrs.h
@@ -511,6 +511,9 @@ class GIntrinsic final : public GenericMachineInstr {
Intrinsic::ID getIntrinsicID() const {
return getOperand(getNumExplicitDefs()).getIntrinsicID();
}
+ void setIntrinsicID(Intrinsic::ID ID) {
+ getOperand(getNumExplicitDefs()).setIntrinsicID(ID);
+ }
bool is(Intrinsic::ID ID) const { return getIntrinsicID() == ID; }
``````````
</details>
https://github.com/llvm/llvm-project/pull/106236
More information about the llvm-commits
mailing list