[llvm] [SandboxIR] Add more functions to sandboxir:Instruction class. (PR #110050)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 25 15:28:39 PDT 2024
================
@@ -1954,6 +1962,55 @@ class Instruction : public sandboxir::User {
}
bool isShift() const { return cast<llvm::Instruction>(Val)->isShift(); }
bool isCast() const { return cast<llvm::Instruction>(Val)->isCast(); }
+ bool isFuncletPad() const { return cast<llvm::Instruction>(Val)->isFuncletPad(); }
+ bool isSpecialTerminator() const { return cast<llvm::Instruction>(Val)->isSpecialTerminator(); }
+ bool isOnlyUserOfAnyOperand() const { return cast<llvm::Instruction>(Val)->isOnlyUserOfAnyOperand(); }
+ bool isLogicalShift() const { return cast<llvm::Instruction>(Val)->isLogicalShift(); }
+
+ //===--------------------------------------------------------------------===//
+ // Metadata manipulation.
+ //===--------------------------------------------------------------------===//
+
+ /// Return true if the instruction has any metadata attached to it.
+ bool hasMetadata() const { return cast<llvm::Instruction>(Val)->hasMetadata(); }
----------------
vporpo wrote:
Not sure about whether we should give access to metadata at this point, because these are LLVM IR structures and we can't really track their state.
https://github.com/llvm/llvm-project/pull/110050
More information about the llvm-commits
mailing list