[llvm-commits] [llvm] r122345 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Stuart Hastings stuart at apple.com
Tue Dec 21 09:16:59 PST 2010


Author: stuart
Date: Tue Dec 21 11:16:58 2010
New Revision: 122345

URL: http://llvm.org/viewvc/llvm-project?rev=122345&view=rev
Log:
Fix indentation, add comment.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=122345&r1=122344&r2=122345&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Tue Dec 21 11:16:58 2010
@@ -253,13 +253,15 @@
 /// FindCallEndFromCallStart - Given a chained node that is part of a call
 /// sequence, find the CALLSEQ_END node that terminates the call sequence.
 static SDNode *FindCallEndFromCallStart(SDNode *Node, int depth = 0) {
+  // Nested CALLSEQ_START/END constructs aren't yet legal,
+  // but we can DTRT and handle them correctly here.
   if (Node->getOpcode() == ISD::CALLSEQ_START)
     depth++;
   else if (Node->getOpcode() == ISD::CALLSEQ_END) {
-      depth--;
-      if (depth == 0)
-        return Node;
-    }
+    depth--;
+    if (depth == 0)
+      return Node;
+  }
   if (Node->use_empty())
     return 0;   // No CallSeqEnd
 





More information about the llvm-commits mailing list