[llvm-commits] [llvm] r96466 - /llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
Chris Lattner
sabre at nondot.org
Tue Feb 16 22:53:36 PST 2010
Author: lattner
Date: Wed Feb 17 00:53:36 2010
New Revision: 96466
URL: http://llvm.org/viewvc/llvm-project?rev=96466&view=rev
Log:
reduce nesting.
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=96466&r1=96465&r2=96466&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Wed Feb 17 00:53:36 2010
@@ -1648,7 +1648,9 @@
if (!isUse && Pat->getTransformFn())
I->error("Cannot specify a transform function for a non-input value!");
return;
- } else if (Pat->getOperator()->getName() == "implicit") {
+ }
+
+ if (Pat->getOperator()->getName() == "implicit") {
for (unsigned i = 0, e = Pat->getNumChildren(); i != e; ++i) {
TreePatternNode *Dest = Pat->getChild(i);
if (!Dest->isLeaf())
@@ -1660,7 +1662,9 @@
InstImpResults.push_back(Val->getDef());
}
return;
- } else if (Pat->getOperator()->getName() != "set") {
+ }
+
+ if (Pat->getOperator()->getName() != "set") {
// If this is not a set, verify that the children nodes are not void typed,
// and recurse.
for (unsigned i = 0, e = Pat->getNumChildren(); i != e; ++i) {
@@ -1677,7 +1681,7 @@
if (!isUse && Pat->getTransformFn())
I->error("Cannot specify a transform function for a non-input value!");
return;
- }
+ }
// Otherwise, this is a set, validate and collect instruction results.
if (Pat->getNumChildren() == 0)
More information about the llvm-commits
mailing list