aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2011-07-26 22:00:59 +0000
committerDan Gohman <gohman@apple.com>2011-07-26 22:00:59 +0000
commitc680b92460abaa8daa7796c05447f64b01b9f11b (patch)
treef92c849ad4b064ba3d23034aeb750b52d4c43b37 /lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
parent45f3929ef0dcdf281a10f23e031ffaba7664e7c0 (diff)
downloadexternal_llvm-c680b92460abaa8daa7796c05447f64b01b9f11b.zip
external_llvm-c680b92460abaa8daa7796c05447f64b01b9f11b.tar.gz
external_llvm-c680b92460abaa8daa7796c05447f64b01b9f11b.tar.bz2
Delete unnecessarily cautious LastCALLSEQ code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136156 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index aadfa26..57d6e8a 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -912,12 +912,7 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) {
case ISD::BR_JT:
case ISD::BR_CC:
case ISD::BRCOND:
- assert(LastCALLSEQ.size() == 1 && "branch inside CALLSEQ_BEGIN/END?");
- // Branches tweak the chain to include LastCALLSEQ
- Ops[0] = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Ops[0],
- getLastCALLSEQ());
Ops[0] = LegalizeOp(Ops[0]);
- setLastCALLSEQ(DAG.getEntryNode());
break;
case ISD::SHL:
case ISD::SRL:
@@ -1021,14 +1016,6 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) {
// libcalls), create the new CALLSEQ_START node.
Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain.
- // Merge in the last call to ensure that this call starts after the last
- // call ended.
- if (getLastCALLSEQ().getOpcode() != ISD::EntryToken) {
- Tmp1 = DAG.getNode(ISD::TokenFactor, dl, MVT::Other,
- Tmp1, getLastCALLSEQ());
- Tmp1 = LegalizeOp(Tmp1);
- }
-
// Do not try to legalize the target-specific arguments (#1+).
if (Tmp1 != Node->getOperand(0)) {
SmallVector<SDValue, 8> Ops(Node->op_begin(), Node->op_end());
@@ -1050,7 +1037,7 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) {
setLastCALLSEQ(SDValue(CallEnd, 0));
// Legalize the call, starting from the CALLSEQ_END.
- LegalizeOp(getLastCALLSEQ());
+ LegalizeOp(SDValue(CallEnd, 0));
return Result;
}
case ISD::CALLSEQ_END: