diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-01-31 09:59:15 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-01-31 09:59:15 +0000 |
commit | bb81d97feb396a8bb21d074db1c57e9f66525f40 (patch) | |
tree | 1b7fda6273344331e160122778fe96319e45d842 /lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | |
parent | 8535624739e55ab7424eadf792e1a3b4123421c7 (diff) |
Add an extra operand to LABEL nodes which distinguishes between debug, EH, or misc labels. This fixes the EH breakage. However I am not convinced this is *the* solution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46609 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 1dbcf8529d..9a4bec2acc 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -1060,7 +1060,8 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { unsigned Col = cast<ConstantSDNode>(ColOp)->getValue(); unsigned ID = MMI->RecordLabel(Line, Col, SrcFile); Ops.push_back(DAG.getConstant(ID, MVT::i32)); - Result = DAG.getNode(ISD::LABEL, MVT::Other,&Ops[0],Ops.size()); + Ops.push_back(DAG.getConstant(0, MVT::i32)); // a debug label + Result = DAG.getNode(ISD::LABEL, MVT::Other, &Ops[0], Ops.size()); } } else { Result = Tmp1; // chain @@ -1103,13 +1104,14 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { break; case ISD::LABEL: - assert(Node->getNumOperands() == 2 && "Invalid LABEL node!"); + assert(Node->getNumOperands() == 3 && "Invalid LABEL node!"); switch (TLI.getOperationAction(ISD::LABEL, MVT::Other)) { default: assert(0 && "This action is not supported yet!"); case TargetLowering::Legal: Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain. Tmp2 = LegalizeOp(Node->getOperand(1)); // Legalize the label id. - Result = DAG.UpdateNodeOperands(Result, Tmp1, Tmp2); + Tmp3 = LegalizeOp(Node->getOperand(2)); // Legalize the "flavor" operand. + Result = DAG.UpdateNodeOperands(Result, Tmp1, Tmp2, Tmp3); break; case TargetLowering::Expand: Result = LegalizeOp(Node->getOperand(0)); |