switch some calls to SelectionDAG::getTargetNode to use
authorChris Lattner <sabre@nondot.org>
Wed, 24 Oct 2007 06:25:09 +0000 (06:25 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 24 Oct 2007 06:25:09 +0000 (06:25 +0000)
the one that takes an operand list instead of explicit
operands.  There is one left though, the more interesting
one :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43290 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/DAGISelEmitter.cpp

index e385c96835a3326996b069e47989a0f280f9cc0a..d61b01dd5199d1106623dc61e0924478a21d785b 100644 (file)
@@ -3718,8 +3718,9 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
      << "  unsigned C = cast<ConstantSDNode>(N1)->getValue();\n"
      << "  SDOperand Tmp = CurDAG->getTargetConstant(C, MVT::i32);\n"
      << "  AddToISelQueue(Chain);\n"
+     << "  SDOperand Ops[] = { Tmp, Chain };\n"
      << "  return CurDAG->getTargetNode(TargetInstrInfo::LABEL,\n"
-     << "                               MVT::Other, Tmp, Chain);\n"
+     << "                               MVT::Other, Ops, 2);\n"
      << "}\n\n";
 
   OS << "SDNode *Select_EXTRACT_SUBREG(const SDOperand &N) {\n"
@@ -3728,8 +3729,9 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
      << "  unsigned C = cast<ConstantSDNode>(N1)->getValue();\n"
      << "  SDOperand Tmp = CurDAG->getTargetConstant(C, MVT::i32);\n"
      << "  AddToISelQueue(N0);\n"
+     << "  SDOperand Ops[] = { N0, Tmp };\n"
      << "  return CurDAG->getTargetNode(TargetInstrInfo::EXTRACT_SUBREG,\n"
-     << "                               N.getValueType(), N0, Tmp);\n"
+     << "                               N.getValueType(), Ops, 2);\n"
      << "}\n\n";
 
   OS << "SDNode *Select_INSERT_SUBREG(const SDOperand &N) {\n"
@@ -3739,13 +3741,14 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
      << "  unsigned C = cast<ConstantSDNode>(N2)->getValue();\n"
      << "  SDOperand Tmp = CurDAG->getTargetConstant(C, MVT::i32);\n"
      << "  AddToISelQueue(N1);\n"
+     << "  SDOperand Ops[] = { N0, N1, Tmp };\n"
      << "  if (N0.getOpcode() == ISD::UNDEF) {\n"
      << "    return CurDAG->getTargetNode(TargetInstrInfo::INSERT_SUBREG,\n"
-     << "                                 N.getValueType(), N1, Tmp);\n"
+     << "                                 N.getValueType(), Ops+1, 2);\n"
      << "  } else {\n"
      << "    AddToISelQueue(N0);\n"
      << "    return CurDAG->getTargetNode(TargetInstrInfo::INSERT_SUBREG,\n"
-     << "                                 N.getValueType(), N0, N1, Tmp);\n"
+     << "                                 N.getValueType(), Ops, 3);\n"
      << "  }\n"
      << "}\n\n";