From fb116aed60d637876e9f87f9d5e9653301d091c4 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Tue, 7 Dec 2010 23:05:49 +0000 Subject: Add source Record* reference to PatternToMatch. Allows better diagnostics. llvm-svn: 121196 --- llvm/utils/TableGen/CodeGenDAGPatterns.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.h') diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.h b/llvm/utils/TableGen/CodeGenDAGPatterns.h index 0a1362ab249..97f51d89566 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 &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; } -- cgit v1.2.3