Lines Matching refs:OS

61   void run(raw_ostream &OS);
64 void emitEnums(raw_ostream &OS,
76 void emitTIIHelperMethods(raw_ostream &OS, StringRef TargetName,
81 void emitMCIIHelperMethods(raw_ostream &OS, StringRef TargetName);
84 void emitFeatureVerifier(raw_ostream &OS, const CodeGenTarget &Target);
88 const OperandInfoMapTy &OperandInfo, raw_ostream &OS);
90 raw_ostream &OS, const CodeGenTarget &Target,
93 raw_ostream &OS, const CodeGenTarget &Target,
96 raw_ostream &OS, StringRef Namespace,
102 void EmitOperandInfo(raw_ostream &OS, OperandInfoListTy &OperandInfoList);
214 void InstrInfoEmitter::EmitOperandInfo(raw_ostream &OS, in EmitOperandInfo() argument
218 OS << " /* " << Offset << " */"; in EmitOperandInfo()
220 OS << " { " << Info << " },"; in EmitOperandInfo()
221 OS << '\n'; in EmitOperandInfo()
241 raw_ostream &OS, const CodeGenTarget &Target, in emitOperandNameMappings() argument
285 OS << "#ifdef GET_INSTRINFO_OPERAND_ENUM\n"; in emitOperandNameMappings()
286 OS << "#undef GET_INSTRINFO_OPERAND_ENUM\n"; in emitOperandNameMappings()
287 OS << "namespace llvm::" << Namespace << " {\n"; in emitOperandNameMappings()
288 OS << "enum class OpName {\n"; in emitOperandNameMappings()
290 OS << " " << Op.first << " = " << I << ",\n"; in emitOperandNameMappings()
291 OS << " NUM_OPERAND_NAMES = " << NumOperandNames << ",\n"; in emitOperandNameMappings()
292 OS << "}; // enum class OpName\n\n"; in emitOperandNameMappings()
293 OS << "LLVM_READONLY\n"; in emitOperandNameMappings()
294 OS << "int16_t getNamedOperandIdx(uint16_t Opcode, OpName Name);\n"; in emitOperandNameMappings()
295 OS << "} // end namespace llvm::" << Namespace << '\n'; in emitOperandNameMappings()
296 OS << "#endif //GET_INSTRINFO_OPERAND_ENUM\n\n"; in emitOperandNameMappings()
298 OS << "#ifdef GET_INSTRINFO_NAMED_OPS\n"; in emitOperandNameMappings()
299 OS << "#undef GET_INSTRINFO_NAMED_OPS\n"; in emitOperandNameMappings()
300 OS << "namespace llvm::" << Namespace << " {\n"; in emitOperandNameMappings()
301 OS << "LLVM_READONLY\n"; in emitOperandNameMappings()
302 OS << "int16_t getNamedOperandIdx(uint16_t Opcode, OpName Name) {\n"; in emitOperandNameMappings()
303 OS << " assert(Name != OpName::NUM_OPERAND_NAMES);\n"; in emitOperandNameMappings()
308 OS << " static constexpr " << Type << " OperandMap[][" << NumOperandNames in emitOperandNameMappings()
314 OS << " {"; in emitOperandNameMappings()
317 OS << (Iter != OpList.end() ? (int)Iter->second : -1) << ", "; in emitOperandNameMappings()
319 OS << "},\n"; in emitOperandNameMappings()
321 OS << " };\n"; in emitOperandNameMappings()
323 OS << " switch(Opcode) {\n"; in emitOperandNameMappings()
326 OS << " case " << Namespace << "::" << Name << ":\n"; in emitOperandNameMappings()
327 OS << " return OperandMap[" << TableIndex in emitOperandNameMappings()
330 OS << " default: return -1;\n"; in emitOperandNameMappings()
331 OS << " }\n"; in emitOperandNameMappings()
334 OS << " return -1;\n"; in emitOperandNameMappings()
336 OS << "}\n"; in emitOperandNameMappings()
337 OS << "} // end namespace llvm::" << Namespace << '\n'; in emitOperandNameMappings()
338 OS << "#endif //GET_INSTRINFO_NAMED_OPS\n\n"; in emitOperandNameMappings()
346 raw_ostream &OS, const CodeGenTarget &Target, in emitOperandTypeMappings() argument
363 OS << "#ifdef GET_INSTRINFO_OPERAND_TYPES_ENUM\n"; in emitOperandTypeMappings()
364 OS << "#undef GET_INSTRINFO_OPERAND_TYPES_ENUM\n"; in emitOperandTypeMappings()
365 OS << "namespace llvm::" << Namespace << "::OpTypes {\n"; in emitOperandTypeMappings()
366 OS << "enum OperandType {\n"; in emitOperandTypeMappings()
373 OS << " " << Op->getName() << " = " << EnumVal << ",\n"; in emitOperandTypeMappings()
378 OS << " OPERAND_TYPE_LIST_END" in emitOperandTypeMappings()
380 OS << "} // end namespace llvm::" << Namespace << "::OpTypes\n"; in emitOperandTypeMappings()
381 OS << "#endif // GET_INSTRINFO_OPERAND_TYPES_ENUM\n\n"; in emitOperandTypeMappings()
383 OS << "#ifdef GET_INSTRINFO_OPERAND_TYPE\n"; in emitOperandTypeMappings()
384 OS << "#undef GET_INSTRINFO_OPERAND_TYPE\n"; in emitOperandTypeMappings()
385 OS << "namespace llvm::" << Namespace << " {\n"; in emitOperandTypeMappings()
386 OS << "LLVM_READONLY\n"; in emitOperandTypeMappings()
387 OS << "static int getOperandType(uint16_t Opcode, uint16_t OpIdx) {\n"; in emitOperandTypeMappings()
416 OS << " static constexpr " << getMinimalTypeForRange(OperandRecords.size()); in emitOperandTypeMappings()
417 OS << " Offsets[] = {\n"; in emitOperandTypeMappings()
419 OS << " " << Offset << ", // " << getInstrName(Idx) << '\n'; in emitOperandTypeMappings()
420 OS << " };\n"; in emitOperandTypeMappings()
429 OS << "\n using namespace OpTypes;\n"; in emitOperandTypeMappings()
430 OS << " static"; in emitOperandTypeMappings()
431 OS << (EnumVal <= INT8_MAX ? " constexpr int8_t" : " constexpr int16_t"); in emitOperandTypeMappings()
432 OS << " OpcodeOperandTypes[] = {"; in emitOperandTypeMappings()
437 OS << "\n /* " << getInstrName(CurOffset) << " */\n "; in emitOperandTypeMappings()
439 OS << "/* " << getInstrName(CurOffset) << " */\n "; in emitOperandTypeMappings()
444 OS << OpR->getName(); in emitOperandTypeMappings()
446 OS << -1; in emitOperandTypeMappings()
447 OS << ", "; in emitOperandTypeMappings()
449 OS << "\n };\n"; in emitOperandTypeMappings()
451 OS << " return OpcodeOperandTypes[Offsets[Opcode] + OpIdx];\n"; in emitOperandTypeMappings()
452 OS << "}\n"; in emitOperandTypeMappings()
453 OS << "} // end namespace llvm::" << Namespace << '\n'; in emitOperandTypeMappings()
454 OS << "#endif // GET_INSTRINFO_OPERAND_TYPE\n\n"; in emitOperandTypeMappings()
456 OS << "#ifdef GET_INSTRINFO_MEM_OPERAND_SIZE\n"; in emitOperandTypeMappings()
457 OS << "#undef GET_INSTRINFO_MEM_OPERAND_SIZE\n"; in emitOperandTypeMappings()
458 OS << "namespace llvm::" << Namespace << " {\n"; in emitOperandTypeMappings()
459 OS << "LLVM_READONLY\n"; in emitOperandTypeMappings()
460 OS << "static int getMemOperandSize(int OpType) {\n"; in emitOperandTypeMappings()
461 OS << " switch (OpType) {\n"; in emitOperandTypeMappings()
469 OS << " default: return 0;\n"; in emitOperandTypeMappings()
472 OS << " case OpTypes::" << OperandName << ":\n"; in emitOperandTypeMappings()
473 OS << " return " << Size << ";\n\n"; in emitOperandTypeMappings()
475 OS << " }\n}\n"; in emitOperandTypeMappings()
476 OS << "} // end namespace llvm::" << Namespace << '\n'; in emitOperandTypeMappings()
477 OS << "#endif // GET_INSTRINFO_MEM_OPERAND_SIZE\n\n"; in emitOperandTypeMappings()
483 raw_ostream &OS, StringRef Namespace, in emitLogicalOperandSizeMappings() argument
512 OS << "#ifdef GET_INSTRINFO_LOGICAL_OPERAND_SIZE_MAP\n"; in emitLogicalOperandSizeMappings()
513 OS << "#undef GET_INSTRINFO_LOGICAL_OPERAND_SIZE_MAP\n"; in emitLogicalOperandSizeMappings()
514 OS << "namespace llvm::" << Namespace << " {\n"; in emitLogicalOperandSizeMappings()
515 OS << "LLVM_READONLY static unsigned\n"; in emitLogicalOperandSizeMappings()
516 OS << "getLogicalOperandSize(uint16_t Opcode, uint16_t LogicalOpIdx) {\n"; in emitLogicalOperandSizeMappings()
523 OS << " static const unsigned SizeMap[][" << LogicalOpListSize in emitLogicalOperandSizeMappings()
527 OS << " {"; in emitLogicalOperandSizeMappings()
530 OS << Row[i] << ", "; in emitLogicalOperandSizeMappings()
533 OS << "0, "; in emitLogicalOperandSizeMappings()
535 OS << "}, \n"; in emitLogicalOperandSizeMappings()
537 OS << " };\n"; in emitLogicalOperandSizeMappings()
539 OS << " switch (Opcode) {\n"; in emitLogicalOperandSizeMappings()
540 OS << " default: return LogicalOpIdx;\n"; in emitLogicalOperandSizeMappings()
545 OS << " case " << Inst << ":\n"; in emitLogicalOperandSizeMappings()
547 OS << " return SizeMap[" << OpMapIdx << "][LogicalOpIdx];\n"; in emitLogicalOperandSizeMappings()
549 OS << " }\n"; in emitLogicalOperandSizeMappings()
551 OS << " return LogicalOpIdx;\n"; in emitLogicalOperandSizeMappings()
553 OS << "}\n"; in emitLogicalOperandSizeMappings()
555 OS << "LLVM_READONLY static inline unsigned\n"; in emitLogicalOperandSizeMappings()
556 OS << "getLogicalOperandIdx(uint16_t Opcode, uint16_t LogicalOpIdx) {\n"; in emitLogicalOperandSizeMappings()
557 OS << " auto S = 0U;\n"; in emitLogicalOperandSizeMappings()
558 OS << " for (auto i = 0U; i < LogicalOpIdx; ++i)\n"; in emitLogicalOperandSizeMappings()
559 OS << " S += getLogicalOperandSize(Opcode, i);\n"; in emitLogicalOperandSizeMappings()
560 OS << " return S;\n"; in emitLogicalOperandSizeMappings()
561 OS << "}\n"; in emitLogicalOperandSizeMappings()
563 OS << "} // end namespace llvm::" << Namespace << '\n'; in emitLogicalOperandSizeMappings()
564 OS << "#endif // GET_INSTRINFO_LOGICAL_OPERAND_SIZE_MAP\n\n"; in emitLogicalOperandSizeMappings()
567 void InstrInfoEmitter::emitMCIIHelperMethods(raw_ostream &OS, in emitMCIIHelperMethods() argument
572 OS << "#ifdef GET_INSTRINFO_MC_HELPER_DECLS\n"; in emitMCIIHelperMethods()
573 OS << "#undef GET_INSTRINFO_MC_HELPER_DECLS\n\n"; in emitMCIIHelperMethods()
575 OS << "namespace llvm {\n"; in emitMCIIHelperMethods()
576 OS << "class MCInst;\n"; in emitMCIIHelperMethods()
577 OS << "class FeatureBitset;\n\n"; in emitMCIIHelperMethods()
579 OS << "namespace " << TargetName << "_MC {\n\n"; in emitMCIIHelperMethods()
582 OS << "bool " << Rec->getValueAsString("FunctionName") in emitMCIIHelperMethods()
586 OS << "void verifyInstructionPredicates(unsigned Opcode, const FeatureBitset " in emitMCIIHelperMethods()
589 OS << "\n} // end namespace " << TargetName << "_MC\n"; in emitMCIIHelperMethods()
590 OS << "} // end namespace llvm\n\n"; in emitMCIIHelperMethods()
592 OS << "#endif // GET_INSTRINFO_MC_HELPER_DECLS\n\n"; in emitMCIIHelperMethods()
594 OS << "#ifdef GET_INSTRINFO_MC_HELPERS\n"; in emitMCIIHelperMethods()
595 OS << "#undef GET_INSTRINFO_MC_HELPERS\n\n"; in emitMCIIHelperMethods()
597 OS << "namespace llvm::" << TargetName << "_MC {\n"; in emitMCIIHelperMethods()
603 OS << "bool " << Rec->getValueAsString("FunctionName"); in emitMCIIHelperMethods()
604 OS << "(const MCInst &MI) {\n"; in emitMCIIHelperMethods()
606 OS << PE.getIndent(); in emitMCIIHelperMethods()
607 PE.expandStatement(OS, Rec->getValueAsDef("Body")); in emitMCIIHelperMethods()
608 OS << "\n}\n\n"; in emitMCIIHelperMethods()
611 OS << "} // end namespace llvm::" << TargetName << "_MC\n"; in emitMCIIHelperMethods()
613 OS << "#endif // GET_GENISTRINFO_MC_HELPERS\n\n"; in emitMCIIHelperMethods()
624 void InstrInfoEmitter::emitFeatureVerifier(raw_ostream &OS, in emitFeatureVerifier() argument
630 OS << "#if (defined(ENABLE_INSTR_PREDICATE_VERIFIER) && !defined(NDEBUG)) " in emitFeatureVerifier()
635 OS << "#ifdef GET_COMPUTE_FEATURES\n" in emitFeatureVerifier()
641 OS); in emitFeatureVerifier()
643 OS << "inline "; in emitFeatureVerifier()
645 Target.getName(), "", "computeAvailableFeatures", SubtargetFeatures, OS); in emitFeatureVerifier()
673 OS << "inline FeatureBitset computeRequiredFeatures(unsigned Opcode) {\n" in emitFeatureVerifier()
679 OS << " " << getNameForFeatureBitset(FeatureBitset) << ",\n"; in emitFeatureVerifier()
681 OS << " };\n\n" in emitFeatureVerifier()
687 OS << " {"; in emitFeatureVerifier()
691 OS << I->second.getEnumBitName() << ", "; in emitFeatureVerifier()
693 OS << "},\n"; in emitFeatureVerifier()
695 OS << " };\n" in emitFeatureVerifier()
700 OS << " CEFBS"; in emitFeatureVerifier()
706 OS << '_' << I->second.TheDef->getName(); in emitFeatureVerifier()
711 OS << "_None"; in emitFeatureVerifier()
712 OS << ", // " << Inst->TheDef->getName() << " = " << InstIdx << '\n'; in emitFeatureVerifier()
715 OS << " };\n\n" in emitFeatureVerifier()
720 OS << "} // end namespace llvm::" << Target.getName() << "_MC\n" in emitFeatureVerifier()
723 OS << "#ifdef GET_AVAILABLE_OPCODE_CHECKER\n" in emitFeatureVerifier()
726 OS << "bool isOpcodeAvailable(" in emitFeatureVerifier()
737 OS << "} // end namespace llvm::" << Target.getName() << "_MC\n" in emitFeatureVerifier()
740 OS << "#ifdef ENABLE_INSTR_PREDICATE_VERIFIER\n" in emitFeatureVerifier()
744 OS << "namespace llvm::" << Target.getName() << "_MC {\n"; in emitFeatureVerifier()
747 OS << "#ifndef NDEBUG\n"; in emitFeatureVerifier()
748 SubtargetFeatureInfo::emitNameTable(SubtargetFeatures, OS); in emitFeatureVerifier()
749 OS << "#endif // NDEBUG\n\n"; in emitFeatureVerifier()
752 OS << "void verifyInstructionPredicates(\n" in emitFeatureVerifier()
755 OS << " FeatureBitset AvailableFeatures = " in emitFeatureVerifier()
757 OS << " FeatureBitset RequiredFeatures = " in emitFeatureVerifier()
759 OS << " FeatureBitset MissingFeatures =\n" in emitFeatureVerifier()
774 OS << "}\n"; in emitFeatureVerifier()
775 OS << "} // end namespace llvm::" << Target.getName() << "_MC\n"; in emitFeatureVerifier()
776 OS << "#endif // ENABLE_INSTR_PREDICATE_VERIFIER\n\n"; in emitFeatureVerifier()
779 void InstrInfoEmitter::emitTIIHelperMethods(raw_ostream &OS, in emitTIIHelperMethods() argument
791 OS << (ExpandDefinition ? "" : "static ") << "bool "; in emitTIIHelperMethods()
793 OS << TargetName << "InstrInfo::"; in emitTIIHelperMethods()
794 OS << Rec->getValueAsString("FunctionName"); in emitTIIHelperMethods()
795 OS << "(const MachineInstr &MI)"; in emitTIIHelperMethods()
797 OS << ";\n"; in emitTIIHelperMethods()
801 OS << " {\n"; in emitTIIHelperMethods()
802 OS << PE.getIndent(); in emitTIIHelperMethods()
803 PE.expandStatement(OS, Rec->getValueAsDef("Body")); in emitTIIHelperMethods()
804 OS << "\n}\n\n"; in emitTIIHelperMethods()
813 void InstrInfoEmitter::run(raw_ostream &OS) { in run() argument
817 emitSourceFileHeader("Target Instruction Enum Values and Descriptors", OS); in run()
823 emitEnums(OS, NumberedInstructions); in run()
860 OS << "#if defined(GET_INSTRINFO_MC_DESC) || " in run()
862 OS << "namespace llvm {\n\n"; in run()
864 OS << "struct " << TargetName << "InstrTable {\n"; in run()
865 OS << " MCInstrDesc Insts[" << NumberedInstructions.size() << "];\n"; in run()
866 OS << " static_assert(alignof(MCInstrDesc) >= alignof(MCOperandInfo), " in run()
868 OS << " MCOperandInfo OperandInfo[" << OperandInfoSize << "];\n"; in run()
869 OS << " static_assert(alignof(MCOperandInfo) >= alignof(MCPhysReg), " in run()
871 OS << " MCPhysReg ImplicitOps[" << std::max(ImplicitListSize, 1U) << "];\n"; in run()
872 OS << "};\n\n"; in run()
874 OS << "} // end namespace llvm\n"; in run()
875 OS << "#endif // defined(GET_INSTRINFO_MC_DESC) || " in run()
878 OS << "#ifdef GET_INSTRINFO_MC_DESC\n"; in run()
879 OS << "#undef GET_INSTRINFO_MC_DESC\n"; in run()
880 OS << "namespace llvm {\n\n"; in run()
884 OS << "static_assert(sizeof(MCOperandInfo) % sizeof(MCPhysReg) == 0);\n"; in run()
885 OS << "static constexpr unsigned " << TargetName << "ImpOpBase = sizeof " in run()
888 OS << "extern const " << TargetName << "InstrTable " << TargetName in run()
896 emitRecord(*Inst, --Num, InstrInfo, EmittedLists, OperandInfoMap, OS); in run()
899 OS << " }, {\n"; in run()
903 EmitOperandInfo(OS, OperandInfoList); in run()
905 OS << " }, {\n"; in run()
910 OS << " /* " << EmittedLists[List] << " */"; in run()
912 OS << ' ' << getQualifiedName(Reg) << ','; in run()
913 OS << '\n'; in run()
916 OS << " }\n};\n\n"; in run()
921 InstrNames.emitStringLiteralDef(OS, Twine("extern const char ") + TargetName + in run()
924 OS << "extern const unsigned " << TargetName << "InstrNameIndices[] = {"; in run()
929 OS << "\n "; in run()
930 OS << InstrNames.get(Inst->TheDef->getName()) << "U, "; in run()
933 OS << "\n};\n\n"; in run()
941 OS << "extern const uint8_t " << TargetName in run()
946 OS << "\n "; in run()
949 OS << Target.getInstNamespace() << "::" << Inst->DeprecatedReason in run()
952 OS << "uint8_t(-1), "; in run()
955 OS << "\n};\n\n"; in run()
963 OS << "extern const MCInstrInfo::ComplexDeprecationPredicate " << TargetName in run()
968 OS << "\n "; in run()
971 OS << "&get" << Inst->DeprecatedReason << "DeprecationInfo, "; in run()
973 OS << "nullptr, "; in run()
976 OS << "\n};\n\n"; in run()
981 OS << "static inline void Init" << TargetName in run()
983 OS << " II->InitMCInstrInfo(" << TargetName << "Descs.Insts, " << TargetName in run()
986 OS << TargetName << "InstrDeprecationFeatures, "; in run()
988 OS << "nullptr, "; in run()
990 OS << TargetName << "InstrComplexDeprecationInfos, "; in run()
992 OS << "nullptr, "; in run()
993 OS << NumberedInstructions.size() << ");\n}\n\n"; in run()
995 OS << "} // end namespace llvm\n"; in run()
997 OS << "#endif // GET_INSTRINFO_MC_DESC\n\n"; in run()
1000 OS << "#ifdef GET_INSTRINFO_HEADER\n"; in run()
1001 OS << "#undef GET_INSTRINFO_HEADER\n"; in run()
1004 OS << "namespace llvm {\n"; in run()
1005 OS << "struct " << ClassName << " : public TargetInstrInfo {\n" in run()
1011 OS << "\n};\n} // end namespace llvm\n"; in run()
1013 OS << "#endif // GET_INSTRINFO_HEADER\n\n"; in run()
1015 OS << "#ifdef GET_INSTRINFO_HELPER_DECLS\n"; in run()
1016 OS << "#undef GET_INSTRINFO_HELPER_DECLS\n\n"; in run()
1017 emitTIIHelperMethods(OS, TargetName, /* ExpandDefinition = */ false); in run()
1018 OS << '\n'; in run()
1019 OS << "#endif // GET_INSTRINFO_HELPER_DECLS\n\n"; in run()
1021 OS << "#ifdef GET_INSTRINFO_HELPERS\n"; in run()
1022 OS << "#undef GET_INSTRINFO_HELPERS\n\n"; in run()
1023 emitTIIHelperMethods(OS, TargetName, /* ExpandDefinition = */ true); in run()
1024 OS << "#endif // GET_INSTRINFO_HELPERS\n\n"; in run()
1026 OS << "#ifdef GET_INSTRINFO_CTOR_DTOR\n"; in run()
1027 OS << "#undef GET_INSTRINFO_CTOR_DTOR\n"; in run()
1029 OS << "namespace llvm {\n"; in run()
1030 OS << "extern const " << TargetName << "InstrTable " << TargetName in run()
1032 OS << "extern const unsigned " << TargetName << "InstrNameIndices[];\n"; in run()
1033 OS << "extern const char " << TargetName << "InstrNameData[];\n"; in run()
1035 OS << "extern const uint8_t " << TargetName in run()
1038 OS << "extern const MCInstrInfo::ComplexDeprecationPredicate " << TargetName in run()
1040 OS << ClassName << "::" << ClassName in run()
1048 OS << TargetName << "InstrDeprecationFeatures, "; in run()
1050 OS << "nullptr, "; in run()
1052 OS << TargetName << "InstrComplexDeprecationInfos, "; in run()
1054 OS << "nullptr, "; in run()
1055 OS << NumberedInstructions.size() << ");\n}\n"; in run()
1056 OS << "} // end namespace llvm\n"; in run()
1058 OS << "#endif // GET_INSTRINFO_CTOR_DTOR\n\n"; in run()
1065 emitOperandNameMappings(OS, Target, TargetInstructions); in run()
1069 emitOperandTypeMappings(OS, Target, NumberedInstructions); in run()
1073 emitLogicalOperandSizeMappings(OS, TargetName, TargetInstructions); in run()
1077 emitMCIIHelperMethods(OS, TargetName); in run()
1080 emitFeatureVerifier(OS, Target); in run()
1083 EmitMapTable(Records, OS); in run()
1089 const OperandInfoMapTy &OperandInfoMap, raw_ostream &OS) { in emitRecord() argument
1102 OS << " { "; in emitRecord()
1103 OS << Num << ",\t" << MinOperands << ",\t" << DefOperands << ",\t" in emitRecord()
1110 OS << Inst.ImplicitUses.size() << ",\t" << Inst.ImplicitDefs.size() << ",\t"; in emitRecord()
1116 OS << OperandInfoMap.find(OperandInfo)->second << ",\t"; in emitRecord()
1119 OS << Target.getName() << "ImpOpBase + " << EmittedLists[ImplicitOps] in emitRecord()
1124 OS << "|(1ULL<<MCID::PreISelOpcode)"; in emitRecord()
1126 OS << "|(1ULL<<MCID::Pseudo)"; in emitRecord()
1128 OS << "|(1ULL<<MCID::Meta)"; in emitRecord()
1130 OS << "|(1ULL<<MCID::Return)"; in emitRecord()
1132 OS << "|(1ULL<<MCID::EHScopeReturn)"; in emitRecord()
1134 OS << "|(1ULL<<MCID::Branch)"; in emitRecord()
1136 OS << "|(1ULL<<MCID::IndirectBranch)"; in emitRecord()
1138 OS << "|(1ULL<<MCID::Compare)"; in emitRecord()
1140 OS << "|(1ULL<<MCID::MoveImm)"; in emitRecord()
1142 OS << "|(1ULL<<MCID::MoveReg)"; in emitRecord()
1144 OS << "|(1ULL<<MCID::Bitcast)"; in emitRecord()
1146 OS << "|(1ULL<<MCID::Add)"; in emitRecord()
1148 OS << "|(1ULL<<MCID::Trap)"; in emitRecord()
1150 OS << "|(1ULL<<MCID::Select)"; in emitRecord()
1152 OS << "|(1ULL<<MCID::Barrier)"; in emitRecord()
1154 OS << "|(1ULL<<MCID::DelaySlot)"; in emitRecord()
1156 OS << "|(1ULL<<MCID::Call)"; in emitRecord()
1158 OS << "|(1ULL<<MCID::FoldableAsLoad)"; in emitRecord()
1160 OS << "|(1ULL<<MCID::MayLoad)"; in emitRecord()
1162 OS << "|(1ULL<<MCID::MayStore)"; in emitRecord()
1164 OS << "|(1ULL<<MCID::MayRaiseFPException)"; in emitRecord()
1166 OS << "|(1ULL<<MCID::Predicable)"; in emitRecord()
1168 OS << "|(1ULL<<MCID::ConvertibleTo3Addr)"; in emitRecord()
1170 OS << "|(1ULL<<MCID::Commutable)"; in emitRecord()
1172 OS << "|(1ULL<<MCID::Terminator)"; in emitRecord()
1174 OS << "|(1ULL<<MCID::Rematerializable)"; in emitRecord()
1176 OS << "|(1ULL<<MCID::NotDuplicable)"; in emitRecord()
1178 OS << "|(1ULL<<MCID::HasOptionalDef)"; in emitRecord()
1180 OS << "|(1ULL<<MCID::UsesCustomInserter)"; in emitRecord()
1182 OS << "|(1ULL<<MCID::HasPostISelHook)"; in emitRecord()
1184 OS << "|(1ULL<<MCID::Variadic)"; in emitRecord()
1186 OS << "|(1ULL<<MCID::UnmodeledSideEffects)"; in emitRecord()
1188 OS << "|(1ULL<<MCID::CheapAsAMove)"; in emitRecord()
1190 OS << "|(1ULL<<MCID::ExtraSrcRegAllocReq)"; in emitRecord()
1192 OS << "|(1ULL<<MCID::ExtraDefRegAllocReq)"; in emitRecord()
1194 OS << "|(1ULL<<MCID::RegSequence)"; in emitRecord()
1196 OS << "|(1ULL<<MCID::ExtractSubreg)"; in emitRecord()
1198 OS << "|(1ULL<<MCID::InsertSubreg)"; in emitRecord()
1200 OS << "|(1ULL<<MCID::Convergent)"; in emitRecord()
1202 OS << "|(1ULL<<MCID::VariadicOpsAreDefs)"; in emitRecord()
1204 OS << "|(1ULL<<MCID::Authenticated)"; in emitRecord()
1218 OS << ", 0x"; in emitRecord()
1219 OS.write_hex(Value); in emitRecord()
1220 OS << "ULL"; in emitRecord()
1222 OS << " }, // Inst #" << Num << " = " << Inst.TheDef->getName() << '\n'; in emitRecord()
1227 raw_ostream &OS, in emitEnums() argument
1229 OS << "#ifdef GET_INSTRINFO_ENUM\n"; in emitEnums()
1230 OS << "#undef GET_INSTRINFO_ENUM\n"; in emitEnums()
1238 OS << "namespace llvm::" << Namespace << " {\n"; in emitEnums()
1240 OS << " enum {\n"; in emitEnums()
1242 OS << " " << Inst->TheDef->getName() in emitEnums()
1244 OS << " INSTRUCTION_LIST_END = " << NumberedInstructions.size() << '\n'; in emitEnums()
1245 OS << " };\n\n"; in emitEnums()
1246 OS << "} // end namespace llvm::" << Namespace << '\n'; in emitEnums()
1247 OS << "#endif // GET_INSTRINFO_ENUM\n\n"; in emitEnums()
1249 OS << "#ifdef GET_INSTRINFO_SCHED_ENUM\n"; in emitEnums()
1250 OS << "#undef GET_INSTRINFO_SCHED_ENUM\n"; in emitEnums()
1251 OS << "namespace llvm::" << Namespace << "::Sched {\n\n"; in emitEnums()
1252 OS << " enum {\n"; in emitEnums()
1255 OS << " " << Class.Name << "\t= " << Idx << ",\n"; in emitEnums()
1256 OS << " SCHED_LIST_END = " << ExplictClasses.size() << '\n'; in emitEnums()
1257 OS << " };\n"; in emitEnums()
1258 OS << "} // end namespace llvm::" << Namespace << "::Sched\n"; in emitEnums()
1260 OS << "#endif // GET_INSTRINFO_SCHED_ENUM\n\n"; in emitEnums()