diff options
author | Evan Cheng <evan.cheng@apple.com> | 2005-12-14 22:02:59 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2005-12-14 22:02:59 +0000 |
commit | 58e84a69f5d24ca7804bbbd5ee9c29df8584acb6 (patch) | |
tree | b43aff3bc3565ebaff8917a5e2980bd822d0bbbe /utils/TableGen/DAGISelEmitter.h | |
parent | 3bd5fac76f4fcc229d054ef46d5040de9abaa9f4 (diff) | |
download | external_llvm-58e84a69f5d24ca7804bbbd5ee9c29df8584acb6.zip external_llvm-58e84a69f5d24ca7804bbbd5ee9c29df8584acb6.tar.gz external_llvm-58e84a69f5d24ca7804bbbd5ee9c29df8584acb6.tar.bz2 |
Added support to specify predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24715 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DAGISelEmitter.h')
-rw-r--r-- | utils/TableGen/DAGISelEmitter.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/utils/TableGen/DAGISelEmitter.h b/utils/TableGen/DAGISelEmitter.h index 7a050c5..1fbb326 100644 --- a/utils/TableGen/DAGISelEmitter.h +++ b/utils/TableGen/DAGISelEmitter.h @@ -353,13 +353,27 @@ namespace llvm { TreePatternNode *getResultPattern() const { return ResultPattern; } }; - +/// PatternToMatch - Used by DAGISelEmitter to keep tab of patterns processed +/// to produce isel. +struct PatternToMatch { + PatternToMatch(ListInit *preds, TreePatternNode *src, TreePatternNode *dst): + Predicates(preds), SrcPattern(src), DstPattern(dst) {}; + + ListInit *Predicates; // Top level predicate conditions to match. + TreePatternNode *SrcPattern; // Source pattern to match. + TreePatternNode *DstPattern; // Resulting pattern. + + ListInit *getPredicates() const { return Predicates; } + TreePatternNode *getSrcPattern() const { return SrcPattern; } + TreePatternNode *getDstPattern() const { return DstPattern; } +}; + /// InstrSelectorEmitter - The top-level class which coordinates construction /// and emission of the instruction selector. /// class DAGISelEmitter : public TableGenBackend { public: - typedef std::pair<TreePatternNode*, TreePatternNode*> PatternToMatch; + //typedef std::pair<TreePatternNode*, TreePatternNode*> PatternToMatch; private: RecordKeeper &Records; CodeGenTarget Target; |