[llvm] [SandboxIR] Implement LoadInst (PR #99597)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 18 22:13:09 PDT 2024
================
@@ -553,6 +557,50 @@ class Instruction : public sandboxir::User {
#endif
};
+class LoadInst : public Instruction {
+ /// Use Context::createLoadInst(). Don't call the
+ /// constructor directly.
+ LoadInst(llvm::LoadInst *LI, Context &Ctx)
+ : Instruction(ClassID::Load, Opcode::Load, LI, Ctx) {}
+ friend Context; // for LoadInst()
+ Use getOperandUseInternal(unsigned OpIdx, bool Verify) const final {
+ return getOperandUseDefault(OpIdx, Verify);
+ }
+ SmallVector<llvm::Instruction *, 1> getLLVMInstrs() const final {
+ return {cast<llvm::Instruction>(Val)};
+ }
+
+public:
+ unsigned getUseOperandNo(const Use &Use) const final {
----------------
tschuett wrote:
Indeed. I found occurrence.
https://github.com/llvm/llvm-project/pull/99597
More information about the llvm-commits
mailing list