Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.278 -> 1.279 SelectionDAG.cpp updated: 1.245 -> 1.246 --- Log message: Remove the ISD::CALL and ISD::TAILCALL nodes --- Diffs of the changes: (+1 -83) LegalizeDAG.cpp | 80 ------------------------------------------------------- SelectionDAG.cpp | 4 -- 2 files changed, 1 insertion(+), 83 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.278 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.279 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.278 Thu Jan 26 16:24:51 2006 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Fri Jan 27 18:18:58 2006 @@ -903,34 +903,6 @@ AddLegalizedOperand(SDOperand(Node, 0), Result); AddLegalizedOperand(SDOperand(Node, 1), Result.getValue(1)); return Result.getValue(Op.ResNo); - case ISD::TAILCALL: - case ISD::CALL: { - Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain. - Tmp2 = LegalizeOp(Node->getOperand(1)); // Legalize the callee. - - bool Changed = false; - std::vector<SDOperand> Ops; - for (unsigned i = 2, e = Node->getNumOperands(); i != e; ++i) { - Ops.push_back(LegalizeOp(Node->getOperand(i))); - Changed |= Ops.back() != Node->getOperand(i); - } - - if (Tmp1 != Node->getOperand(0) || Tmp2 != Node->getOperand(1) || Changed) { - std::vector<MVT::ValueType> RetTyVTs; - RetTyVTs.reserve(Node->getNumValues()); - for (unsigned i = 0, e = Node->getNumValues(); i != e; ++i) - RetTyVTs.push_back(Node->getValueType(i)); - Result = SDOperand(DAG.getCall(RetTyVTs, Tmp1, Tmp2, Ops, - Node->getOpcode() == ISD::TAILCALL), 0); - } else { - Result = Result.getValue(0); - } - // Since calls produce multiple values, make sure to remember that we - // legalized all of them. - for (unsigned i = 0, e = Node->getNumValues(); i != e; ++i) - AddLegalizedOperand(SDOperand(Node, i), Result.getValue(i)); - return Result.getValue(Op.ResNo); - } case ISD::BR: Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain. if (Tmp1 != Node->getOperand(0)) @@ -3278,29 +3250,6 @@ Node->getOperand(1), Tmp2, Tmp3, Node->getOperand(4)); break; - case ISD::TAILCALL: - case ISD::CALL: { - Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain. - Tmp2 = LegalizeOp(Node->getOperand(1)); // Legalize the callee. - - std::vector<SDOperand> Ops; - for (unsigned i = 2, e = Node->getNumOperands(); i != e; ++i) - Ops.push_back(LegalizeOp(Node->getOperand(i))); - - assert(Node->getNumValues() == 2 && Op.ResNo == 0 && - "Can only promote single result calls"); - std::vector<MVT::ValueType> RetTyVTs; - RetTyVTs.reserve(2); - RetTyVTs.push_back(NVT); - RetTyVTs.push_back(MVT::Other); - SDNode *NC = DAG.getCall(RetTyVTs, Tmp1, Tmp2, Ops, - Node->getOpcode() == ISD::TAILCALL); - Result = SDOperand(NC, 0); - - // Insert the new chain mapping. - AddLegalizedOperand(Op.getValue(1), Result.getValue(1)); - break; - } case ISD::BSWAP: Tmp1 = Node->getOperand(0); Tmp1 = DAG.getNode(ISD::ZERO_EXTEND, NVT, Tmp1); @@ -4079,35 +4028,6 @@ } break; } - case ISD::TAILCALL: - case ISD::CALL: { - SDOperand Chain = LegalizeOp(Node->getOperand(0)); // Legalize the chain. - SDOperand Callee = LegalizeOp(Node->getOperand(1)); // Legalize the callee. - - bool Changed = false; - std::vector<SDOperand> Ops; - for (unsigned i = 2, e = Node->getNumOperands(); i != e; ++i) { - Ops.push_back(LegalizeOp(Node->getOperand(i))); - Changed |= Ops.back() != Node->getOperand(i); - } - - assert(Node->getNumValues() == 2 && Op.ResNo == 0 && - "Can only expand a call once so far, not i64 -> i16!"); - - std::vector<MVT::ValueType> RetTyVTs; - RetTyVTs.reserve(3); - RetTyVTs.push_back(NVT); - RetTyVTs.push_back(NVT); - RetTyVTs.push_back(MVT::Other); - SDNode *NC = DAG.getCall(RetTyVTs, Chain, Callee, Ops, - Node->getOpcode() == ISD::TAILCALL); - Lo = SDOperand(NC, 0); - Hi = SDOperand(NC, 1); - - // Insert the new chain mapping. - AddLegalizedOperand(Op.getValue(1), Hi.getValue(2)); - break; - } case ISD::AND: case ISD::OR: case ISD::XOR: { // Simple logical operators -> two trivial pieces. Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.245 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.246 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.245 Thu Jan 26 16:24:51 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Fri Jan 27 18:18:58 2006 @@ -374,7 +374,7 @@ // flag result (which cannot be CSE'd) or is one of the special cases that are // not subject to CSE. if (!Erased && N->getValueType(N->getNumValues()-1) != MVT::Flag && - N->getOpcode() != ISD::CALL && N->getOpcode() != ISD::CALLSEQ_START && + N->getOpcode() != ISD::CALLSEQ_START && N->getOpcode() != ISD::CALLSEQ_END && !N->isTargetOpcode()) { N->dump(); @@ -2096,8 +2096,6 @@ case ISD::BR_CC: return "br_cc"; case ISD::BRTWOWAY_CC: return "brtwoway_cc"; case ISD::RET: return "ret"; - case ISD::CALL: return "call"; - case ISD::TAILCALL:return "tailcall"; case ISD::CALLSEQ_START: return "callseq_start"; case ISD::CALLSEQ_END: return "callseq_end"; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits