diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-12-07 23:05:49 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-12-07 23:05:49 +0000 |
commit | fb116aed60d637876e9f87f9d5e9653301d091c4 (patch) | |
tree | a18bf3085742d5320b59fa42ff533b8c99b3a424 /llvm/utils/TableGen/CodeGenDAGPatterns.h | |
parent | 721724e64318e737625bd524e3fbb45e6ce10539 (diff) | |
download | llvm-fb116aed60d637876e9f87f9d5e9653301d091c4.zip llvm-fb116aed60d637876e9f87f9d5e9653301d091c4.tar.gz llvm-fb116aed60d637876e9f87f9d5e9653301d091c4.tar.bz2 |
Add source Record* reference to PatternToMatch. Allows better diagnostics.
llvm-svn: 121196
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.h')
-rw-r--r-- | llvm/utils/TableGen/CodeGenDAGPatterns.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.h b/llvm/utils/TableGen/CodeGenDAGPatterns.h index 0a1362a..97f51d8 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.h +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.h @@ -568,13 +568,14 @@ public: /// processed to produce isel. class PatternToMatch { public: - PatternToMatch(ListInit *preds, + PatternToMatch(Record *srcrecord, ListInit *preds, TreePatternNode *src, TreePatternNode *dst, const std::vector<Record*> &dstregs, unsigned complexity, unsigned uid) - : Predicates(preds), SrcPattern(src), DstPattern(dst), + : SrcRecord(srcrecord), Predicates(preds), SrcPattern(src), DstPattern(dst), Dstregs(dstregs), AddedComplexity(complexity), ID(uid) {} + Record *SrcRecord; // Originating Record for the pattern. ListInit *Predicates; // Top level predicate conditions to match. TreePatternNode *SrcPattern; // Source pattern to match. TreePatternNode *DstPattern; // Resulting pattern. @@ -582,6 +583,7 @@ public: unsigned AddedComplexity; // Add to matching pattern complexity. unsigned ID; // Unique ID for the record. + Record *getSrcRecord() const { return SrcRecord; } ListInit *getPredicates() const { return Predicates; } TreePatternNode *getSrcPattern() const { return SrcPattern; } TreePatternNode *getDstPattern() const { return DstPattern; } |