diff options
author | Nate Begeman <natebegeman@mac.com> | 2006-01-25 18:21:52 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2006-01-25 18:21:52 +0000 |
commit | acc398c195a697795bff3245943d104eb19192b9 (patch) | |
tree | d5efdfaaaf3a9c0d6b467c769dee5ea884aced3c /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 05ebc8d795f039f1b7647bb33e995aa2f5c40b73 (diff) |
First part of bug 680:
Remove TLI.LowerVA* and replace it with SDNodes that are lowered the same
way as everything else.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25606 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index ed96bd61ae..d864042537 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -1348,6 +1348,20 @@ SDOperand SelectionDAG::getSrcValue(const Value *V, int Offset) { return SDOperand(N, 0); } +SDOperand SelectionDAG::getVAArg(MVT::ValueType VT, + SDOperand Chain, SDOperand Ptr, + SDOperand SV) { + std::vector<SDOperand> Ops; + Ops.reserve(3); + Ops.push_back(Chain); + Ops.push_back(Ptr); + Ops.push_back(SV); + std::vector<MVT::ValueType> VTs; + VTs.reserve(2); + VTs.push_back(VT); VTs.push_back(MVT::Other); // Add token chain. + return getNode(ISD::VAARG, VTs, Ops); +} + SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, std::vector<SDOperand> &Ops) { switch (Ops.size()) { @@ -2087,14 +2101,17 @@ const char *SDNode::getOperationName(const SelectionDAG *G) const { case ISD::CALLSEQ_END: return "callseq_end"; // Other operators - case ISD::LOAD: return "load"; - case ISD::STORE: return "store"; - case ISD::VLOAD: return "vload"; - case ISD::EXTLOAD: return "extload"; - case ISD::SEXTLOAD: return "sextload"; - case ISD::ZEXTLOAD: return "zextload"; - case ISD::TRUNCSTORE: return "truncstore"; - + case ISD::LOAD: return "load"; + case ISD::STORE: return "store"; + case ISD::VLOAD: return "vload"; + case ISD::EXTLOAD: return "extload"; + case ISD::SEXTLOAD: return "sextload"; + case ISD::ZEXTLOAD: return "zextload"; + case ISD::TRUNCSTORE: return "truncstore"; + case ISD::VAARG: return "vaarg"; + case ISD::VACOPY: return "vacopy"; + case ISD::VAEND: return "vaend"; + case ISD::VASTART: return "vastart"; case ISD::DYNAMIC_STACKALLOC: return "dynamic_stackalloc"; case ISD::EXTRACT_ELEMENT: return "extract_element"; case ISD::BUILD_PAIR: return "build_pair"; |