[llvm-commits] [llvm] r97510 - /llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp
Chris Lattner
sabre at nondot.org
Mon Mar 1 14:19:47 PST 2010
Author: lattner
Date: Mon Mar 1 16:19:47 2010
New Revision: 97510
URL: http://llvm.org/viewvc/llvm-project?rev=97510&view=rev
Log:
remove dead code, simplify.
Modified:
llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp
Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp?rev=97510&r1=97509&r2=97510&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp (original)
+++ llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Mon Mar 1 16:19:47 2010
@@ -392,16 +392,10 @@
}
- // 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,
More information about the llvm-commits
mailing list