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

Stuart Hastings stuart at apple.com
Tue Dec 21 09:07:24 PST 2010


Author: stuart
Date: Tue Dec 21 11:07:24 2010
New Revision: 122342

URL: http://llvm.org/viewvc/llvm-project?rev=122342&view=rev
Log:
Missing logic for nested CALLSEQ_START/END.

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=122342&r1=122341&r2=122342&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Tue Dec 21 11:07:24 2010
@@ -255,8 +255,11 @@
 static SDNode *FindCallEndFromCallStart(SDNode *Node, int depth = 0) {
   if (Node->getOpcode() == ISD::CALLSEQ_START)
     depth++;
-  if ((Node->getOpcode() == ISD::CALLSEQ_END) && (depth == 1))
-    return Node;
+  else if (Node->getOpcode() == ISD::CALLSEQ_END) {
+      depth--;
+      if (depth == 0)
+        return Node;
+    }
   if (Node->use_empty())
     return 0;   // No CallSeqEnd
 





More information about the llvm-commits mailing list