From 39305cf55363046162c5a992f96f26d607a204e5 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 5 Oct 2007 01:10:49 +0000 Subject: [PATCH] Add a variant of getTargetNode() that takes a vector of MVT::ValueType. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42620 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/SelectionDAG.h | 2 ++ lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index 05447e12f87..9a9445dbfb0 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -414,6 +414,8 @@ public: MVT::ValueType VT2, MVT::ValueType VT3, MVT::ValueType VT4, const SDOperand *Ops, unsigned NumOps); + SDNode *getTargetNode(unsigned Opcode, std::vector &ResultTys, + const SDOperand *Ops, unsigned NumOps); /// ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead. /// This can cause recursive merging of nodes in the DAG. Use the first diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 5ed676e2adc..8e55850b1ab 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -3054,6 +3054,13 @@ SDNode *SelectionDAG::getTargetNode(unsigned Opcode, MVT::ValueType VT1, const MVT::ValueType *VTs = getNodeValueTypes(VTList); return getNode(ISD::BUILTIN_OP_END+Opcode, VTs, 4, Ops, NumOps).Val; } +SDNode *SelectionDAG::getTargetNode(unsigned Opcode, + std::vector &ResultTys, + const SDOperand *Ops, unsigned NumOps) { + const MVT::ValueType *VTs = getNodeValueTypes(ResultTys); + return getNode(ISD::BUILTIN_OP_END+Opcode, VTs, ResultTys.size(), + Ops, NumOps).Val; +} /// ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead. /// This can cause recursive merging of nodes in the DAG.