summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenTarget.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/TableGen/CodeGenTarget.h')
-rw-r--r--llvm/utils/TableGen/CodeGenTarget.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.h b/llvm/utils/TableGen/CodeGenTarget.h
index 922c2b41a10..a14f6303bd5 100644
--- a/llvm/utils/TableGen/CodeGenTarget.h
+++ b/llvm/utils/TableGen/CodeGenTarget.h
@@ -42,6 +42,9 @@ enum SDNP {
SDNPSideEffect
};
+// ComplexPattern attributes.
+enum CPAttr { CPAttrParentAsRoot };
+
/// getValueType - Return the MVT::ValueType that the specified TableGen record
/// corresponds to.
MVT::ValueType getValueType(Record *Rec);
@@ -172,7 +175,8 @@ class ComplexPattern {
unsigned NumOperands;
std::string SelectFunc;
std::vector<Record*> RootNodes;
- unsigned Properties;
+ unsigned Properties; // Node properties
+ unsigned Attributes; // Pattern attributes
public:
ComplexPattern() : NumOperands(0) {};
ComplexPattern(Record *R);
@@ -184,7 +188,7 @@ public:
return RootNodes;
}
bool hasProperty(enum SDNP Prop) const { return Properties & (1 << Prop); }
-
+ bool hasAttribute(enum CPAttr Attr) const { return Attributes & (1 << Attr); }
};
} // End llvm namespace
OpenPOWER on IntegriCloud