diff options
author | Dale Johannesen <dalej@apple.com> | 2008-03-05 19:14:03 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-03-05 19:14:03 +0000 |
commit | 8ee39c61f21c3c7e0967aa061be0ca8071f678a3 (patch) | |
tree | 3a4c2609200be1ab8361dc604423e178507cc13e /llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | |
parent | c156f1ffc6fd0bc5825a9895e7a00abc012f52f5 (diff) | |
download | bcm5719-llvm-8ee39c61f21c3c7e0967aa061be0ca8071f678a3.tar.gz bcm5719-llvm-8ee39c61f21c3c7e0967aa061be0ca8071f678a3.zip |
Clarify that CALLSEQ_START..END may not be nested,
and add some protection against creating such.
llvm-svn: 47957
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 82324cd5b99..fd9cf154436 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -1266,6 +1266,13 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { // The only option for this is to custom lower it. Tmp3 = TLI.LowerOperation(Result.getValue(0), DAG); assert(Tmp3.Val && "Target didn't custom lower this node!"); + // A call within a calling sequence must be legalized to something + // other than the normal CALLSEQ_END. Violating this gets Legalize + // into an infinite loop. + assert ((!IsLegalizingCall || + Node->getOpcode() != ISD::CALL || + Tmp3.Val->getOpcode() != ISD::CALLSEQ_END) && + "Nested CALLSEQ_START..CALLSEQ_END not supported."); // The number of incoming and outgoing values should match; unless the final // outgoing value is a flag. |