[llvm-commits] [llvm] r92155 - /llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
Bill Wendling
isanbard at gmail.com
Fri Dec 25 05:35:41 PST 2009
Author: void
Date: Fri Dec 25 07:35:40 2009
New Revision: 92155
URL: http://llvm.org/viewvc/llvm-project?rev=92155&view=rev
Log:
Use the 'MadeChange' variable instead of returning 'false' all of the time.
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=92155&r1=92154&r2=92155&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Fri Dec 25 07:35:40 2009
@@ -321,8 +321,7 @@
getOperandNum(x.SDTCisVTSmallerThanOp_Info.OtherOperandNum, N,NumResults);
// It must be integer.
- bool MadeChange = false;
- MadeChange |= OtherNode->UpdateNodeType(MVT::iAny, TP);
+ bool MadeChange = OtherNode->UpdateNodeType(MVT::iAny, TP);
// This code only handles nodes that have one type set. Assert here so
// that we can change this if we ever need to deal with multiple value
@@ -330,7 +329,7 @@
assert(OtherNode->getExtTypes().size() == 1 && "Node has too many types!");
if (OtherNode->hasTypeSet() && OtherNode->getTypeNum(0) <= VT)
OtherNode->UpdateNodeType(MVT::Other, TP); // Throw an error.
- return false;
+ return MadeChange;
}
case SDTCisOpSmallerThanOp: {
TreePatternNode *BigOperand =
More information about the llvm-commits
mailing list