add a method
authorChris Lattner <sabre@nondot.org>
Wed, 24 Aug 2005 23:00:29 +0000 (23:00 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 24 Aug 2005 23:00:29 +0000 (23:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23027 91177308-0d34-0410-b5e6-96231b3b80d8

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

index e1826de8ec065c6f0aec6111c43e45e2f67f6289..32049688eb39cd2685ca41475d4ef95bc944c4f1 100644 (file)
@@ -221,6 +221,7 @@ public:
   /// specified node to have the specified return type, Target opcode, and
   /// operands.  Note that target opcodes are stored as
   /// ISD::BUILTIN_OP_END+TargetOpcode in the node opcode field.
+  void SelectNodeTo(SDNode *N, MVT::ValueType VT, unsigned TargetOpc);
   void SelectNodeTo(SDNode *N, MVT::ValueType VT, unsigned TargetOpc,
                     SDOperand Op1);
   void SelectNodeTo(SDNode *N, MVT::ValueType VT, unsigned TargetOpc,
index 818844959216321358227d49142a4eab7b479098..97c28521c7bf198a1b543c9c79dda518320d14bb 100644 (file)
@@ -1881,6 +1881,12 @@ SDOperand SelectionDAG::getNode(unsigned Opcode,
 /// specified node to have the specified return type, Target opcode, and
 /// operands.  Note that target opcodes are stored as
 /// ISD::BUILTIN_OP_END+TargetOpcode in the node opcode field.
+void SelectionDAG::SelectNodeTo(SDNode *N, MVT::ValueType VT,
+                                unsigned TargetOpc) {
+  RemoveNodeFromCSEMaps(N);
+  N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
+  N->setValueTypes(VT);
+}
 void SelectionDAG::SelectNodeTo(SDNode *N, MVT::ValueType VT,
                                 unsigned TargetOpc, SDOperand Op1) {
   RemoveNodeFromCSEMaps(N);