Added properties such as SDNPHasChain to ComplexPattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30890 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/CodeGenTarget.h b/utils/TableGen/CodeGenTarget.h
index dd58d92..bd40340 100644
--- a/utils/TableGen/CodeGenTarget.h
+++ b/utils/TableGen/CodeGenTarget.h
@@ -29,6 +29,10 @@
struct CodeGenRegister;
class CodeGenTarget;
+// SelectionDAG node properties.
+enum SDNP { SDNPCommutative, SDNPAssociative, SDNPHasChain,
+ SDNPOutFlag, SDNPInFlag, SDNPOptInFlag };
+
/// getValueType - Return the MVT::ValueType that the specified TableGen record
/// corresponds to.
MVT::ValueType getValueType(Record *Rec, const CodeGenTarget *CGT = 0);
@@ -157,6 +161,7 @@
unsigned NumOperands;
std::string SelectFunc;
std::vector<Record*> RootNodes;
+ unsigned Properties;
public:
ComplexPattern() : NumOperands(0) {};
ComplexPattern(Record *R);
@@ -167,6 +172,8 @@
const std::vector<Record*> &getRootNodes() const {
return RootNodes;
}
+ bool hasProperty(enum SDNP Prop) const { return Properties & (1 << Prop); }
+
};
} // End llvm namespace