[llvm-commits] [llvm] r136156 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Dan Gohman
gohman at apple.com
Tue Jul 26 15:00:59 PDT 2011
Author: djg
Date: Tue Jul 26 17:00:59 2011
New Revision: 136156
URL: http://llvm.org/viewvc/llvm-project?rev=136156&view=rev
Log:
Delete unnecessarily cautious LastCALLSEQ code.
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=136156&r1=136155&r2=136156&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Tue Jul 26 17:00:59 2011
@@ -912,12 +912,7 @@
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 @@
// 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 @@
setLastCALLSEQ(SDValue(CallEnd, 0));
// Legalize the call, starting from the CALLSEQ_END.
- LegalizeOp(getLastCALLSEQ());
+ LegalizeOp(SDValue(CallEnd, 0));
return Result;
}
case ISD::CALLSEQ_END:
More information about the llvm-commits
mailing list