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 | d3e31218ef7ccf96b0bc7e06e2ebd279325c97fe (patch) | |
tree | 87de576c7dbab06a9aa8f42223fdc1ed69cc31c4 /utils/TableGen | |
parent | 1cacae0f297b7330c4cd2b4f0a1f95ab2615bd65 (diff) | |
download | external_llvm-d3e31218ef7ccf96b0bc7e06e2ebd279325c97fe.zip external_llvm-d3e31218ef7ccf96b0bc7e06e2ebd279325c97fe.tar.gz external_llvm-d3e31218ef7ccf96b0bc7e06e2ebd279325c97fe.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160384 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
-rw-r--r-- | utils/TableGen/CodeGenDAGPatterns.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp index 09c00dd..34f8a34 100644 --- a/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/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. |