aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/CodeGenInstruction.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/TableGen/CodeGenInstruction.h')
-rw-r--r--llvm/utils/TableGen/CodeGenInstruction.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/llvm/utils/TableGen/CodeGenInstruction.h b/llvm/utils/TableGen/CodeGenInstruction.h
index 2cb28425df7a..1f08ce481a89 100644
--- a/llvm/utils/TableGen/CodeGenInstruction.h
+++ b/llvm/utils/TableGen/CodeGenInstruction.h
@@ -29,10 +29,11 @@ template <typename T> class ArrayRef;
class CGIOperandList {
public:
class ConstraintInfo {
- enum { None, EarlyClobber, Tied } Kind;
- unsigned OtherTiedOperand;
+ enum { None, EarlyClobber, Tied } Kind = None;
+ unsigned OtherTiedOperand = 0;
+
public:
- ConstraintInfo() : Kind(None) {}
+ ConstraintInfo() = default;
static ConstraintInfo getEarlyClobber() {
ConstraintInfo I;
@@ -277,6 +278,7 @@ template <typename T> class ArrayRef;
bool hasChain : 1;
bool hasChain_Inferred : 1;
bool variadicOpsAreDefs : 1;
+ bool isAuthenticated : 1;
std::string DeprecatedReason;
bool HasComplexDeprecationPredicate;
@@ -308,7 +310,17 @@ template <typename T> class ArrayRef;
// This can be used on intructions that use typeN or ptypeN to identify
// operands that should be considered as pointers even though SelectionDAG
// didn't make a distinction between integer and pointers.
- bool isOperandAPointer(unsigned i) const;
+ bool isOperandAPointer(unsigned i) const {
+ return isOperandImpl(i, "IsPointer");
+ }
+
+ /// Check if the operand is required to be an immediate.
+ bool isOperandImmArg(unsigned i) const {
+ return isOperandImpl(i, "IsImmediate");
+ }
+
+ private:
+ bool isOperandImpl(unsigned i, StringRef PropertyName) const;
};
@@ -332,9 +344,9 @@ template <typename T> class ArrayRef;
struct ResultOperand {
private:
std::string Name;
- Record *R;
+ Record *R = nullptr;
+ int64_t Imm = 0;
- int64_t Imm;
public:
enum {
K_Record,