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 | 0ea0356dff38dfd0420b8c0a2fdf2fae7898c024 (patch) | |
tree | b324d28571514f208f3d7300211884311800b015 /lib | |
parent | 327d0651f8c3b1480d8fc1f4d96e07a1452eaa8c (diff) | |
download | llvm-0ea0356dff38dfd0420b8c0a2fdf2fae7898c024.tar.gz llvm-0ea0356dff38dfd0420b8c0a2fdf2fae7898c024.tar.bz2 llvm-0ea0356dff38dfd0420b8c0a2fdf2fae7898c024.tar.xz |
Clarify that CALLSEQ_START..END may not be nested,
and add some protection against creating such.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47957 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 82324cd5b9..fd9cf15443 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/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. |