Add operand constraints to TargetInstrInfo.
[oota-llvm.git] / utils / TableGen / DAGISelEmitter.cpp
index 4f5a731736ec0785e6492d4aacd96552a9b39b91..dfeea10d9e5231c21235b35212e42fb980581865 100644 (file)
@@ -3552,11 +3552,14 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
   // Emit boilerplate.
   OS << "SDNode *Select_INLINEASM(SDOperand N) {\n"
      << "  std::vector<SDOperand> Ops(N.Val->op_begin(), N.Val->op_end());\n"
-     << "  AddToISelQueue(N.getOperand(0)); // Select the chain.\n\n"
+     << "  AddToISelQueue(N.getOperand(0)); // Select the chain.\n"
      << "  // Select the flag operand.\n"
      << "  if (Ops.back().getValueType() == MVT::Flag)\n"
      << "    AddToISelQueue(Ops.back());\n"
      << "  SelectInlineAsmMemoryOperands(Ops, *CurDAG);\n"
+     << "  for (unsigned i = 2, e = Ops.size(); i < e; ++i)\n"
+     << "    if (Ops[i].getOpcode() != ISD::Constant)\n"
+     << "      AddToISelQueue(Ops[i]);\n"
      << "  std::vector<MVT::ValueType> VTs;\n"
      << "  VTs.push_back(MVT::Other);\n"
      << "  VTs.push_back(MVT::Flag);\n"
@@ -3582,6 +3585,7 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
      << "  case ISD::TargetConstantPool:\n"
      << "  case ISD::TargetFrameIndex:\n"
      << "  case ISD::TargetJumpTable:\n"
+     << "  case ISD::TargetExternalSymbol:\n"
      << "  case ISD::TargetGlobalAddress: {\n"
      << "    return NULL;\n"
      << "  }\n"