diff options
| author | Dan Gohman <gohman@apple.com> | 2009-04-09 23:54:40 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-04-09 23:54:40 +0000 |
| commit | de912e2475d49e7f9b0a77f33ffcb78f52504042 (patch) | |
| tree | e7b6bfe5b4807c9dee898e7f75d6a323f3e8d683 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
| parent | 4c56c1c736728f37c53685f464924f69ec69e533 (diff) | |
| download | bcm5719-llvm-de912e2475d49e7f9b0a77f33ffcb78f52504042.tar.gz bcm5719-llvm-de912e2475d49e7f9b0a77f33ffcb78f52504042.zip | |
Remove the obsolete SelectionDAG::getNodeValueTypes and simplify
code that uses it by using SelectionDAG::getVTList instead.
llvm-svn: 68744
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 49 |
1 files changed, 21 insertions, 28 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 3ff0352f668..0f156238985 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2131,7 +2131,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, MVT VT) { if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP)) return SDValue(E, 0); SDNode *N = NodeAllocator.Allocate<SDNode>(); - new (N) SDNode(Opcode, DL, SDNode::getSDVTList(VT)); + new (N) SDNode(Opcode, DL, getVTList(VT)); CSEMap.InsertNode(N, IP); AllNodes.push_back(N); @@ -3724,7 +3724,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, MVT VT, SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, const std::vector<MVT> &ResultTys, const SDValue *Ops, unsigned NumOps) { - return getNode(Opcode, DL, getNodeValueTypes(ResultTys), ResultTys.size(), + return getNode(Opcode, DL, getVTList(&ResultTys[0], ResultTys.size()), Ops, NumOps); } @@ -4360,82 +4360,75 @@ SDNode *SelectionDAG::getTargetNode(unsigned Opcode, DebugLoc dl, MVT VT, SDNode *SelectionDAG::getTargetNode(unsigned Opcode, DebugLoc dl, MVT VT1, MVT VT2) { - const MVT *VTs = getNodeValueTypes(VT1, VT2); + SDVTList VTs = getVTList(VT1, VT2); SDValue Op; - return getNode(~Opcode, dl, VTs, 2, &Op, 0).getNode(); + return getNode(~Opcode, dl, VTs, &Op, 0).getNode(); } SDNode *SelectionDAG::getTargetNode(unsigned Opcode, DebugLoc dl, MVT VT1, MVT VT2, SDValue Op1) { - const MVT *VTs = getNodeValueTypes(VT1, VT2); - return getNode(~Opcode, dl, VTs, 2, &Op1, 1).getNode(); + SDVTList VTs = getVTList(VT1, VT2); + return getNode(~Opcode, dl, VTs, &Op1, 1).getNode(); } SDNode *SelectionDAG::getTargetNode(unsigned Opcode, DebugLoc dl, MVT VT1, MVT VT2, SDValue Op1, SDValue Op2) { - const MVT *VTs = getNodeValueTypes(VT1, VT2); + SDVTList VTs = getVTList(VT1, VT2); SDValue Ops[] = { Op1, Op2 }; - return getNode(~Opcode, dl, VTs, 2, Ops, 2).getNode(); + return getNode(~Opcode, dl, VTs, Ops, 2).getNode(); } SDNode *SelectionDAG::getTargetNode(unsigned Opcode, DebugLoc dl, MVT VT1, MVT VT2, SDValue Op1, SDValue Op2, SDValue Op3) { - const MVT *VTs = getNodeValueTypes(VT1, VT2); + SDVTList VTs = getVTList(VT1, VT2); SDValue Ops[] = { Op1, Op2, Op3 }; - return getNode(~Opcode, dl, VTs, 2, Ops, 3).getNode(); + return getNode(~Opcode, dl, VTs, Ops, 3).getNode(); } SDNode *SelectionDAG::getTargetNode(unsigned Opcode, DebugLoc dl, MVT VT1, MVT VT2, const SDValue *Ops, unsigned NumOps) { - const MVT *VTs = getNodeValueTypes(VT1, VT2); - return getNode(~Opcode, dl, VTs, 2, Ops, NumOps).getNode(); + SDVTList VTs = getVTList(VT1, VT2); + return getNode(~Opcode, dl, VTs, Ops, NumOps).getNode(); } SDNode *SelectionDAG::getTargetNode(unsigned Opcode, DebugLoc dl, MVT VT1, MVT VT2, MVT VT3, SDValue Op1, SDValue Op2) { - const MVT *VTs = getNodeValueTypes(VT1, VT2, VT3); + SDVTList VTs = getVTList(VT1, VT2, VT3); SDValue Ops[] = { Op1, Op2 }; - return getNode(~Opcode, dl, VTs, 3, Ops, 2).getNode(); + return getNode(~Opcode, dl, VTs, Ops, 2).getNode(); } SDNode *SelectionDAG::getTargetNode(unsigned Opcode, DebugLoc dl, MVT VT1, MVT VT2, MVT VT3, SDValue Op1, SDValue Op2, SDValue Op3) { - const MVT *VTs = getNodeValueTypes(VT1, VT2, VT3); + SDVTList VTs = getVTList(VT1, VT2, VT3); SDValue Ops[] = { Op1, Op2, Op3 }; - return getNode(~Opcode, dl, VTs, 3, Ops, 3).getNode(); + return getNode(~Opcode, dl, VTs, Ops, 3).getNode(); } SDNode *SelectionDAG::getTargetNode(unsigned Opcode, DebugLoc dl, MVT VT1, MVT VT2, MVT VT3, const SDValue *Ops, unsigned NumOps) { - const MVT *VTs = getNodeValueTypes(VT1, VT2, VT3); - return getNode(~Opcode, dl, VTs, 3, Ops, NumOps).getNode(); + SDVTList VTs = getVTList(VT1, VT2, VT3); + return getNode(~Opcode, dl, VTs, Ops, NumOps).getNode(); } SDNode *SelectionDAG::getTargetNode(unsigned Opcode, DebugLoc dl, MVT VT1, MVT VT2, MVT VT3, MVT VT4, const SDValue *Ops, unsigned NumOps) { - std::vector<MVT> VTList; - VTList.push_back(VT1); - VTList.push_back(VT2); - VTList.push_back(VT3); - VTList.push_back(VT4); - const MVT *VTs = getNodeValueTypes(VTList); - return getNode(~Opcode, dl, VTs, 4, Ops, NumOps).getNode(); + SDVTList VTs = getVTList(VT1, VT2, VT3, VT4); + return getNode(~Opcode, dl, VTs, Ops, NumOps).getNode(); } SDNode *SelectionDAG::getTargetNode(unsigned Opcode, DebugLoc dl, const std::vector<MVT> &ResultTys, const SDValue *Ops, unsigned NumOps) { - const MVT *VTs = getNodeValueTypes(ResultTys); - return getNode(~Opcode, dl, VTs, ResultTys.size(), - Ops, NumOps).getNode(); + return getNode(~Opcode, dl, ResultTys, Ops, NumOps).getNode(); } /// getNodeIfExists - Get the specified node if it's already available, or |

