Added properties such as SDNPHasChain to ComplexPattern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30890 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2006-10-11 21:02:01 +00:00
parent 7aed46c25b
commit 94b3040fef
4 changed files with 73 additions and 29 deletions
+7
View File
@@ -29,6 +29,10 @@ class RecordKeeper;
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 @@ class ComplexPattern {
unsigned NumOperands;
std::string SelectFunc;
std::vector<Record*> RootNodes;
unsigned Properties;
public:
ComplexPattern() : NumOperands(0) {};
ComplexPattern(Record *R);
@@ -167,6 +172,8 @@ public:
const std::vector<Record*> &getRootNodes() const {
return RootNodes;
}
bool hasProperty(enum SDNP Prop) const { return Properties & (1 << Prop); }
};
} // End llvm namespace