diff options
author | Evan Cheng <evan.cheng@apple.com> | 2005-12-23 22:11:47 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2005-12-23 22:11:47 +0000 |
commit | 7b05bd58149f7984257d7881aaa2bd9407628754 (patch) | |
tree | 7a1e888809ba1a2be1f8e6519cbfc67537680c8b /utils/TableGen/DAGISelEmitter.h | |
parent | d6e8d4134022a3b451439a631b41744e9e07c034 (diff) | |
download | external_llvm-7b05bd58149f7984257d7881aaa2bd9407628754.zip external_llvm-7b05bd58149f7984257d7881aaa2bd9407628754.tar.gz external_llvm-7b05bd58149f7984257d7881aaa2bd9407628754.tar.bz2 |
* Support for hasInFlag and hasOutFlag (on instructions). Remove nameless FLAG
support which is fragile.
* Fixed a number of bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24996 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DAGISelEmitter.h')
-rw-r--r-- | utils/TableGen/DAGISelEmitter.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/utils/TableGen/DAGISelEmitter.h b/utils/TableGen/DAGISelEmitter.h index b53ec7d..5b3aa63 100644 --- a/utils/TableGen/DAGISelEmitter.h +++ b/utils/TableGen/DAGISelEmitter.h @@ -328,19 +328,23 @@ namespace llvm { std::vector<Record*> Results; std::vector<Record*> Operands; std::vector<Record*> ImpResults; + std::vector<Record*> ImpOperands; TreePatternNode *ResultPattern; public: DAGInstruction(TreePattern *TP, const std::vector<Record*> &results, const std::vector<Record*> &operands, - const std::vector<Record*> &impresults) + const std::vector<Record*> &impresults, + const std::vector<Record*> &impoperands) : Pattern(TP), Results(results), Operands(operands), - ImpResults(impresults), ResultPattern(0) {} + ImpResults(impresults), ImpOperands(impoperands), + ResultPattern(0) {} TreePattern *getPattern() const { return Pattern; } unsigned getNumResults() const { return Results.size(); } unsigned getNumOperands() const { return Operands.size(); } unsigned getNumImpResults() const { return ImpResults.size(); } + unsigned getNumImpOperands() const { return ImpOperands.size(); } void setResultPattern(TreePatternNode *R) { ResultPattern = R; } @@ -359,6 +363,11 @@ namespace llvm { return ImpResults[RN]; } + Record *getImpOperand(unsigned ON) const { + assert(ON < ImpOperands.size()); + return ImpOperands[ON]; + } + TreePatternNode *getResultPattern() const { return ResultPattern; } }; @@ -444,6 +453,7 @@ private: std::map<std::string, TreePatternNode*> &InstInputs, std::map<std::string, Record*> &InstResults, + std::vector<Record*> &InstImpInputs, std::vector<Record*> &InstImpResults); void EmitCodeForPattern(PatternToMatch &Pattern, std::ostream &OS); void EmitInstructionSelector(std::ostream &OS); |