diff options
Diffstat (limited to 'contrib/llvm/utils/TableGen/CodeGenTarget.h')
-rw-r--r-- | contrib/llvm/utils/TableGen/CodeGenTarget.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/llvm/utils/TableGen/CodeGenTarget.h b/contrib/llvm/utils/TableGen/CodeGenTarget.h index 85a8c1b..c822e94 100644 --- a/contrib/llvm/utils/TableGen/CodeGenTarget.h +++ b/contrib/llvm/utils/TableGen/CodeGenTarget.h @@ -82,7 +82,7 @@ public: ~CodeGenTarget(); Record *getTargetRecord() const { return TargetRec; } - const std::string &getName() const; + const StringRef getName() const; /// getInstNamespace - Return the target-specific instruction namespace. /// @@ -139,7 +139,7 @@ public: /// supported by the target (i.e. there are registers that directly hold it). bool isLegalValueType(MVT::SimpleValueType VT) const { ArrayRef<MVT::SimpleValueType> LegalVTs = getLegalValueTypes(); - return std::find(LegalVTs.begin(), LegalVTs.end(), VT) != LegalVTs.end(); + return is_contained(LegalVTs, VT); } CodeGenSchedModels &getSchedModels() const; @@ -196,8 +196,8 @@ class ComplexPattern { std::string SelectFunc; std::vector<Record*> RootNodes; unsigned Properties; // Node properties + unsigned Complexity; public: - ComplexPattern() : NumOperands(0) {} ComplexPattern(Record *R); MVT::SimpleValueType getValueType() const { return Ty; } @@ -207,6 +207,7 @@ public: return RootNodes; } bool hasProperty(enum SDNP Prop) const { return Properties & (1 << Prop); } + unsigned getComplexity() const { return Complexity; } }; } // End llvm namespace |