[llvm-commits] [llvm] r43290 - /llvm/trunk/utils/TableGen/DAGISelEmitter.cpp

Chris Lattner sabre at nondot.org
Tue Oct 23 23:25:10 PDT 2007


Author: lattner
Date: Wed Oct 24 01:25:09 2007
New Revision: 43290

URL: http://llvm.org/viewvc/llvm-project?rev=43290&view=rev
Log:
switch some calls to SelectionDAG::getTargetNode to use
the one that takes an operand list instead of explicit
operands.  There is one left though, the more interesting
one :)

Modified:
    llvm/trunk/utils/TableGen/DAGISelEmitter.cpp

Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=43290&r1=43289&r2=43290&view=diff

==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Wed Oct 24 01:25:09 2007
@@ -3718,8 +3718,9 @@
      << "  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 @@
      << "  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 @@
      << "  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";
 





More information about the llvm-commits mailing list