[llvm-commits] [llvm] r160384 - /llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
Jim Grosbach
grosbach at apple.com
Tue Jul 17 11:39:36 PDT 2012
Author: grosbach
Date: Tue Jul 17 13:39:36 2012
New Revision: 160384
URL: http://llvm.org/viewvc/llvm-project?rev=160384&view=rev
Log:
TableGen: Pattern<> references to null_frag are a nop.
A standalone pattern defined in a multiclass expansion should handle
null_frag references just like patterns on instructions. Follow-up to
r160333.
Modified:
llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=160384&r1=160383&r2=160384&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Tue Jul 17 13:39:36 2012
@@ -2908,6 +2908,11 @@
for (unsigned i = 0, e = Patterns.size(); i != e; ++i) {
Record *CurPattern = Patterns[i];
DagInit *Tree = CurPattern->getValueAsDag("PatternToMatch");
+
+ // If the pattern references the null_frag, there's nothing to do.
+ if (hasNullFragReference(Tree))
+ continue;
+
TreePattern *Pattern = new TreePattern(CurPattern, Tree, true, *this);
// Inline pattern fragments into it.
More information about the llvm-commits
mailing list