diff options
author | Jim Grosbach <grosbach@apple.com> | 2012-07-17 18:39:36 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2012-07-17 18:39:36 +0000 |
commit | ab27c5e9947921f5c9be30a02b14dc543f3faf2d (patch) | |
tree | e48289d5489289026710dbb6421c48645ca423b5 | |
parent | 3e242d6d3c1a317eb4616c4b21b196c051f773e3 (diff) | |
download | bcm5719-llvm-ab27c5e9947921f5c9be30a02b14dc543f3faf2d.tar.gz bcm5719-llvm-ab27c5e9947921f5c9be30a02b14dc543f3faf2d.zip |
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.
llvm-svn: 160384
-rw-r--r-- | llvm/utils/TableGen/CodeGenDAGPatterns.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp index 09c00dd4f7d..34f8a34e7af 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp @@ -2908,6 +2908,11 @@ void CodeGenDAGPatterns::ParsePatterns() { 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. |