Add a variant of getTargetNode() that takes a vector of MVT::ValueType.
authorEvan Cheng <evan.cheng@apple.com>
Fri, 5 Oct 2007 01:10:49 +0000 (01:10 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 5 Oct 2007 01:10:49 +0000 (01:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42620 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/SelectionDAG.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index 05447e12f87dc6240e291ee51728a040f2554bd8..9a9445dbfb082d62aed8200a0406ada35338eb63 100644 (file)
@@ -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<MVT::ValueType> &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
index 5ed676e2adc4ec910deaa422d4e57b4a78f71066..8e55850b1ab6d5dc761bfcb9ecb90108c47ef37f 100644 (file)
@@ -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<MVT::ValueType> &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.