[llvm-commits] [llvm] r42620 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAG.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Evan Cheng evan.cheng at apple.com
Thu Oct 4 18:10:50 PDT 2007


Author: evancheng
Date: Thu Oct  4 20:10:49 2007
New Revision: 42620

URL: http://llvm.org/viewvc/llvm-project?rev=42620&view=rev
Log:
Add a variant of getTargetNode() that takes a vector of MVT::ValueType.

Modified:
    llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=42620&r1=42619&r2=42620&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Thu Oct  4 20:10:49 2007
@@ -414,6 +414,8 @@
                         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

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=42620&r1=42619&r2=42620&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu Oct  4 20:10:49 2007
@@ -3054,6 +3054,13 @@
   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.





More information about the llvm-commits mailing list