diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-01 22:19:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-01 22:19:47 +0000 |
commit | 7c720fc33a68678fb4ce736c9a0aba949fca01d4 (patch) | |
tree | 173f8b8fbc75b6fa063a8ce1fe703699d6ec66a5 | |
parent | 117ccb7e518f05e4bf3df058fc402262f897ff0b (diff) |
remove dead code, simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97510 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | utils/TableGen/DAGISelMatcherOpt.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/utils/TableGen/DAGISelMatcherOpt.cpp b/utils/TableGen/DAGISelMatcherOpt.cpp index 97ddf67dd4..ce97fb47bd 100644 --- a/utils/TableGen/DAGISelMatcherOpt.cpp +++ b/utils/TableGen/DAGISelMatcherOpt.cpp @@ -392,16 +392,10 @@ static void FactorNodes(OwningPtr<Matcher> &MatcherPtr) { } - // Reassemble a new Scope node. - assert(!NewOptionsToMatch.empty() && - "Where'd all our children go? Did we really factor everything??"); - if (NewOptionsToMatch.empty()) - MatcherPtr.reset(0); - else { - Scope->setNumChildren(NewOptionsToMatch.size()); - for (unsigned i = 0, e = NewOptionsToMatch.size(); i != e; ++i) - Scope->resetChild(i, NewOptionsToMatch[i]); - } + // Reassemble the Scope node with the adjusted children. + Scope->setNumChildren(NewOptionsToMatch.size()); + for (unsigned i = 0, e = NewOptionsToMatch.size(); i != e; ++i) + Scope->resetChild(i, NewOptionsToMatch[i]); } Matcher *llvm::OptimizeMatcher(Matcher *TheMatcher, |