reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

Declarations

utils/TableGen/GlobalISelEmitter.cpp
  394 class MatchTable;

References

utils/TableGen/GlobalISelEmitter.cpp
  472             const MatchTable &Table) const;
  546   static MatchTable buildTable(ArrayRef<Matcher *> Rules, bool WithCoverage);
  610                             const MatchTable &Table) const {
  642 MatchTable &operator<<(MatchTable &Table, const MatchTableRecord &Value) {
  642 MatchTable &operator<<(MatchTable &Table, const MatchTableRecord &Value) {
  658   virtual void emit(MatchTable &Table) = 0;
  665 MatchTable MatchTable::buildTable(ArrayRef<Matcher *> Rules,
  667   MatchTable Table(WithCoverage);
  671   return Table << MatchTable::Opcode("GIM_Reject") << MatchTable::LineBreak;
  671   return Table << MatchTable::Opcode("GIM_Reject") << MatchTable::LineBreak;
  714   void emit(MatchTable &Table) override;
  769   void emit(MatchTable &Table) override;
  796                                            MatchTable &Table);
  946   void emit(MatchTable &Table) override;
 1037   void emitPredicateListOpcodes(MatchTable &Table, Args &&... args) {
 1039       Table << MatchTable::Comment(getNoPredicateComment())
 1040             << MatchTable::LineBreak;
 1099   virtual void emitPredicateOpcodes(MatchTable &Table,
 1163   void emitPredicateOpcodes(MatchTable &Table,
 1203       return MatchTable::NamedValue(getTy().getCxxEnumValue());
 1204     return MatchTable::NamedValue(getTy().getCxxEnumValue(), VI->second);
 1214   void emitPredicateOpcodes(MatchTable &Table,
 1216     Table << MatchTable::Opcode("GIM_CheckType") << MatchTable::Comment("MI")
 1216     Table << MatchTable::Opcode("GIM_CheckType") << MatchTable::Comment("MI")
 1217           << MatchTable::IntValue(InsnVarID) << MatchTable::Comment("Op")
 1217           << MatchTable::IntValue(InsnVarID) << MatchTable::Comment("Op")
 1218           << MatchTable::IntValue(OpIdx) << MatchTable::Comment("Type")
 1218           << MatchTable::IntValue(OpIdx) << MatchTable::Comment("Type")
 1219           << getValue() << MatchTable::LineBreak;
 1249   void emitPredicateOpcodes(MatchTable &Table,
 1251     Table << MatchTable::Opcode("GIM_CheckPointerToAny")
 1252           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1252           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1253           << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx)
 1253           << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx)
 1254           << MatchTable::Comment("SizeInBits")
 1255           << MatchTable::IntValue(SizeInBits) << MatchTable::LineBreak;
 1255           << MatchTable::IntValue(SizeInBits) << MatchTable::LineBreak;
 1280   void emitPredicateOpcodes(MatchTable &Table,
 1283     Table << MatchTable::Opcode("GIM_CheckComplexPattern")
 1284           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1284           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1285           << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx)
 1285           << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx)
 1286           << MatchTable::Comment("Renderer") << MatchTable::IntValue(ID)
 1286           << MatchTable::Comment("Renderer") << MatchTable::IntValue(ID)
 1287           << MatchTable::NamedValue(("GICP_" + TheDef.getName()).str())
 1288           << MatchTable::LineBreak;
 1315   void emitPredicateOpcodes(MatchTable &Table,
 1317     Table << MatchTable::Opcode("GIM_CheckRegBankForClass")
 1318           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1318           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1319           << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx)
 1319           << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx)
 1320           << MatchTable::Comment("RC")
 1321           << MatchTable::NamedValue(RC.getQualifiedName() + "RegClassID")
 1322           << MatchTable::LineBreak;
 1336   void emitPredicateOpcodes(MatchTable &Table,
 1338     Table << MatchTable::Opcode("GIM_CheckIsMBB") << MatchTable::Comment("MI")
 1338     Table << MatchTable::Opcode("GIM_CheckIsMBB") << MatchTable::Comment("MI")
 1339           << MatchTable::IntValue(InsnVarID) << MatchTable::Comment("Op")
 1339           << MatchTable::IntValue(InsnVarID) << MatchTable::Comment("Op")
 1340           << MatchTable::IntValue(OpIdx) << MatchTable::LineBreak;
 1340           << MatchTable::IntValue(OpIdx) << MatchTable::LineBreak;
 1353   void emitPredicateOpcodes(MatchTable &Table,
 1355     Table << MatchTable::Opcode("GIM_CheckIsImm") << MatchTable::Comment("MI")
 1355     Table << MatchTable::Opcode("GIM_CheckIsImm") << MatchTable::Comment("MI")
 1356           << MatchTable::IntValue(InsnVarID) << MatchTable::Comment("Op")
 1356           << MatchTable::IntValue(InsnVarID) << MatchTable::Comment("Op")
 1357           << MatchTable::IntValue(OpIdx) << MatchTable::LineBreak;
 1357           << MatchTable::IntValue(OpIdx) << MatchTable::LineBreak;
 1380   void emitPredicateOpcodes(MatchTable &Table,
 1382     Table << MatchTable::Opcode("GIM_CheckConstantInt")
 1383           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1383           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1384           << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx)
 1384           << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx)
 1385           << MatchTable::IntValue(Value) << MatchTable::LineBreak;
 1385           << MatchTable::IntValue(Value) << MatchTable::LineBreak;
 1409   void emitPredicateOpcodes(MatchTable &Table,
 1411     Table << MatchTable::Opcode("GIM_CheckLiteralInt")
 1412           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1412           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1413           << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx)
 1413           << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx)
 1414           << MatchTable::IntValue(Value) << MatchTable::LineBreak;
 1414           << MatchTable::IntValue(Value) << MatchTable::LineBreak;
 1437   void emitPredicateOpcodes(MatchTable &Table,
 1439     Table << MatchTable::Opcode("GIM_CheckCmpPredicate")
 1440           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1440           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1441           << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx)
 1441           << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx)
 1442           << MatchTable::Comment("Predicate")
 1443           << MatchTable::NamedValue("CmpInst", PredName)
 1444           << MatchTable::LineBreak;
 1467   void emitPredicateOpcodes(MatchTable &Table,
 1469     Table << MatchTable::Opcode("GIM_CheckIntrinsicID")
 1470           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1470           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1471           << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx)
 1471           << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx)
 1472           << MatchTable::NamedValue("Intrinsic::" + II->EnumName)
 1473           << MatchTable::LineBreak;
 1529   void emitPredicateOpcodes(MatchTable &Table, RuleMatcher &Rule) {
 1538       Table << MatchTable::Comment(CommentOS.str()) << MatchTable::LineBreak;
 1538       Table << MatchTable::Comment(CommentOS.str()) << MatchTable::LineBreak;
 1672       return MatchTable::NamedValue(I->Namespace, I->TheDef->getName(),
 1674     return MatchTable::NamedValue(I->Namespace, I->TheDef->getName());
 1678   void emitPredicateOpcodes(MatchTable &Table,
 1680     Table << MatchTable::Opcode("GIM_CheckOpcode") << MatchTable::Comment("MI")
 1680     Table << MatchTable::Opcode("GIM_CheckOpcode") << MatchTable::Comment("MI")
 1681           << MatchTable::IntValue(InsnVarID) << getValue()
 1682           << MatchTable::LineBreak;
 1737   void emitPredicateOpcodes(MatchTable &Table,
 1739     Table << MatchTable::Opcode("GIM_CheckNumOperands")
 1740           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1740           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1741           << MatchTable::Comment("Expected")
 1742           << MatchTable::IntValue(NumOperands) << MatchTable::LineBreak;
 1742           << MatchTable::IntValue(NumOperands) << MatchTable::LineBreak;
 1793   void emitPredicateOpcodes(MatchTable &Table,
 1795     Table << MatchTable::Opcode(getMatchOpcodeForPredicate(Predicate))
 1796           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1796           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1797           << MatchTable::Comment("Predicate")
 1798           << MatchTable::NamedValue(getEnumNameForPredicate(Predicate))
 1799           << MatchTable::LineBreak;
 1834   void emitPredicateOpcodes(MatchTable &Table,
 1843     Table << MatchTable::Opcode(Opcode) << MatchTable::Comment("MI")
 1843     Table << MatchTable::Opcode(Opcode) << MatchTable::Comment("MI")
 1844           << MatchTable::IntValue(InsnVarID) << MatchTable::Comment("Order")
 1844           << MatchTable::IntValue(InsnVarID) << MatchTable::Comment("Order")
 1845           << MatchTable::NamedValue(("(int64_t)AtomicOrdering::" + Order).str())
 1846           << MatchTable::LineBreak;
 1870   void emitPredicateOpcodes(MatchTable &Table,
 1872     Table << MatchTable::Opcode("GIM_CheckMemorySizeEqualTo")
 1873           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1873           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1874           << MatchTable::Comment("MMO") << MatchTable::IntValue(MMOIdx)
 1874           << MatchTable::Comment("MMO") << MatchTable::IntValue(MMOIdx)
 1875           << MatchTable::Comment("Size") << MatchTable::IntValue(Size)
 1875           << MatchTable::Comment("Size") << MatchTable::IntValue(Size)
 1876           << MatchTable::LineBreak;
 1901   void emitPredicateOpcodes(MatchTable &Table,
 1903     Table << MatchTable::Opcode("GIM_CheckMemoryAddressSpace")
 1904           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1904           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1905           << MatchTable::Comment("MMO") << MatchTable::IntValue(MMOIdx)
 1905           << MatchTable::Comment("MMO") << MatchTable::IntValue(MMOIdx)
 1907           << MatchTable::Comment("NumAddrSpace")
 1908           << MatchTable::IntValue(AddrSpaces.size());
 1910       Table << MatchTable::Comment("AddrSpace") << MatchTable::IntValue(AS);
 1910       Table << MatchTable::Comment("AddrSpace") << MatchTable::IntValue(AS);
 1912     Table << MatchTable::LineBreak;
 1940   void emitPredicateOpcodes(MatchTable &Table,
 1942     Table << MatchTable::Opcode("GIM_CheckMemoryAlignment")
 1943           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1943           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1944           << MatchTable::Comment("MMO") << MatchTable::IntValue(MMOIdx)
 1944           << MatchTable::Comment("MMO") << MatchTable::IntValue(MMOIdx)
 1945           << MatchTable::Comment("MinAlign") << MatchTable::IntValue(MinAlign)
 1945           << MatchTable::Comment("MinAlign") << MatchTable::IntValue(MinAlign)
 1946           << MatchTable::LineBreak;
 1982   void emitPredicateOpcodes(MatchTable &Table,
 1984     Table << MatchTable::Opcode(Relation == EqualTo
 1989           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1989           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 1990           << MatchTable::Comment("MMO") << MatchTable::IntValue(MMOIdx)
 1990           << MatchTable::Comment("MMO") << MatchTable::IntValue(MMOIdx)
 1991           << MatchTable::Comment("OpIdx") << MatchTable::IntValue(OpIdx)
 1991           << MatchTable::Comment("OpIdx") << MatchTable::IntValue(OpIdx)
 1992           << MatchTable::LineBreak;
 2016   void emitPredicateOpcodes(MatchTable &Table,
 2018     Table << MatchTable::Opcode("GIM_CheckCxxInsnPredicate")
 2019           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 2019           << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 2020           << MatchTable::Comment("FnId")
 2021           << MatchTable::NamedValue(getEnumNameForPredicate(Predicate))
 2022           << MatchTable::LineBreak;
 2126   void emitPredicateOpcodes(MatchTable &Table, RuleMatcher &Rule) {
 2239   void emitCaptureOpcodes(MatchTable &Table, RuleMatcher &Rule) const {
 2241     Table << MatchTable::Opcode("GIM_RecordInsn")
 2242           << MatchTable::Comment("DefineMI")
 2243           << MatchTable::IntValue(NewInsnVarID) << MatchTable::Comment("MI")
 2243           << MatchTable::IntValue(NewInsnVarID) << MatchTable::Comment("MI")
 2244           << MatchTable::IntValue(getInsnVarID())
 2245           << MatchTable::Comment("OpIdx") << MatchTable::IntValue(getOpIdx())
 2245           << MatchTable::Comment("OpIdx") << MatchTable::IntValue(getOpIdx())
 2246           << MatchTable::Comment("MIs[" + llvm::to_string(NewInsnVarID) + "]")
 2247           << MatchTable::LineBreak;
 2250   void emitPredicateOpcodes(MatchTable &Table,
 2333   virtual void emitRenderOpcodes(MatchTable &Table,
 2358   void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override {
 2361     Table << MatchTable::Opcode("GIR_Copy") << MatchTable::Comment("NewInsnID")
 2361     Table << MatchTable::Opcode("GIR_Copy") << MatchTable::Comment("NewInsnID")
 2362           << MatchTable::IntValue(NewInsnID) << MatchTable::Comment("OldInsnID")
 2362           << MatchTable::IntValue(NewInsnID) << MatchTable::Comment("OldInsnID")
 2363           << MatchTable::IntValue(OldInsnVarID) << MatchTable::Comment("OpIdx")
 2363           << MatchTable::IntValue(OldInsnVarID) << MatchTable::Comment("OpIdx")
 2364           << MatchTable::IntValue(Operand.getOpIdx())
 2365           << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak;
 2365           << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak;
 2389   void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override {
 2392     Table << MatchTable::Opcode("GIR_Copy") << MatchTable::Comment("NewInsnID")
 2392     Table << MatchTable::Opcode("GIR_Copy") << MatchTable::Comment("NewInsnID")
 2393           << MatchTable::IntValue(NewInsnID) << MatchTable::Comment("OldInsnID")
 2393           << MatchTable::IntValue(NewInsnID) << MatchTable::Comment("OldInsnID")
 2394           << MatchTable::IntValue(OldInsnVarID) << MatchTable::Comment("OpIdx")
 2394           << MatchTable::IntValue(OldInsnVarID) << MatchTable::Comment("OpIdx")
 2395           << MatchTable::IntValue(Operand.getOpIdx())
 2396           << MatchTable::Comment(PhysReg->getName())
 2397           << MatchTable::LineBreak;
 2425   void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override {
 2428     Table << MatchTable::Opcode("GIR_CopyOrAddZeroReg")
 2429           << MatchTable::Comment("NewInsnID") << MatchTable::IntValue(NewInsnID)
 2429           << MatchTable::Comment("NewInsnID") << MatchTable::IntValue(NewInsnID)
 2430           << MatchTable::Comment("OldInsnID")
 2431           << MatchTable::IntValue(OldInsnVarID) << MatchTable::Comment("OpIdx")
 2431           << MatchTable::IntValue(OldInsnVarID) << MatchTable::Comment("OpIdx")
 2432           << MatchTable::IntValue(Operand.getOpIdx())
 2433           << MatchTable::NamedValue(
 2438           << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak;
 2438           << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak;
 2462   void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override {
 2465     Table << MatchTable::Opcode(Signed ? "GIR_CopyConstantAsSImm"
 2467           << MatchTable::Comment("NewInsnID") << MatchTable::IntValue(NewInsnID)
 2467           << MatchTable::Comment("NewInsnID") << MatchTable::IntValue(NewInsnID)
 2468           << MatchTable::Comment("OldInsnID")
 2469           << MatchTable::IntValue(OldInsnVarID)
 2470           << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak;
 2470           << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak;
 2493   void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override {
 2496     Table << MatchTable::Opcode("GIR_CopyFConstantAsFPImm")
 2497           << MatchTable::Comment("NewInsnID") << MatchTable::IntValue(NewInsnID)
 2497           << MatchTable::Comment("NewInsnID") << MatchTable::IntValue(NewInsnID)
 2498           << MatchTable::Comment("OldInsnID")
 2499           << MatchTable::IntValue(OldInsnVarID)
 2500           << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak;
 2500           << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak;
 2527   void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override {
 2530     Table << MatchTable::Opcode("GIR_CopySubReg")
 2531           << MatchTable::Comment("NewInsnID") << MatchTable::IntValue(NewInsnID)
 2531           << MatchTable::Comment("NewInsnID") << MatchTable::IntValue(NewInsnID)
 2532           << MatchTable::Comment("OldInsnID")
 2533           << MatchTable::IntValue(OldInsnVarID) << MatchTable::Comment("OpIdx")
 2533           << MatchTable::IntValue(OldInsnVarID) << MatchTable::Comment("OpIdx")
 2534           << MatchTable::IntValue(Operand.getOpIdx())
 2535           << MatchTable::Comment("SubRegIdx")
 2536           << MatchTable::IntValue(SubReg->EnumValue)
 2537           << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak;
 2537           << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak;
 2559   void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override {
 2560     Table << MatchTable::Opcode("GIR_AddRegister")
 2561           << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2561           << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2562           << MatchTable::NamedValue(
 2567           << MatchTable::Comment("AddRegisterRegFlags");
 2573       Table << MatchTable::NamedValue("RegState::Define");
 2575       Table << MatchTable::IntValue(0);
 2576     Table << MatchTable::LineBreak;
 2598   void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override {
 2599     Table << MatchTable::Opcode("GIR_AddTempRegister")
 2600           << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2600           << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2601           << MatchTable::Comment("TempRegID") << MatchTable::IntValue(TempRegID)
 2601           << MatchTable::Comment("TempRegID") << MatchTable::IntValue(TempRegID)
 2602           << MatchTable::Comment("TempRegFlags");
 2604       Table << MatchTable::NamedValue("RegState::Define");
 2606       Table << MatchTable::IntValue(0);
 2607     Table << MatchTable::LineBreak;
 2625   void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override {
 2626     Table << MatchTable::Opcode("GIR_AddImm") << MatchTable::Comment("InsnID")
 2626     Table << MatchTable::Opcode("GIR_AddImm") << MatchTable::Comment("InsnID")
 2627           << MatchTable::IntValue(InsnID) << MatchTable::Comment("Imm")
 2627           << MatchTable::IntValue(InsnID) << MatchTable::Comment("Imm")
 2628           << MatchTable::IntValue(Imm) << MatchTable::LineBreak;
 2628           << MatchTable::IntValue(Imm) << MatchTable::LineBreak;
 2646   void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override {
 2647     Table << MatchTable::Opcode("GIR_AddImm") << MatchTable::Comment("InsnID")
 2647     Table << MatchTable::Opcode("GIR_AddImm") << MatchTable::Comment("InsnID")
 2648           << MatchTable::IntValue(InsnID) << MatchTable::Comment("SubRegIndex")
 2648           << MatchTable::IntValue(InsnID) << MatchTable::Comment("SubRegIndex")
 2649           << MatchTable::IntValue(SubRegIdx->EnumValue)
 2650           << MatchTable::LineBreak;
 2685   void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override {
 2686     Table << MatchTable::Opcode(SubOperand.hasValue() ? "GIR_ComplexSubOperandRenderer"
 2688           << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2688           << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2689           << MatchTable::Comment("RendererID")
 2690           << MatchTable::IntValue(RendererID);
 2692       Table << MatchTable::Comment("SubOperand")
 2693             << MatchTable::IntValue(SubOperand.getValue());
 2694     Table << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak;
 2694     Table << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak;
 2715   void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override {
 2718     Table << MatchTable::Opcode("GIR_CustomRenderer")
 2719           << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2719           << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2720           << MatchTable::Comment("OldInsnID")
 2721           << MatchTable::IntValue(OldInsnVarID)
 2722           << MatchTable::Comment("Renderer")
 2723           << MatchTable::NamedValue(
 2725           << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak;
 2725           << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak;
 2739   virtual void emitActionOpcodes(MatchTable &Table,
 2751   void emitActionOpcodes(MatchTable &Table, RuleMatcher &Rule) const override {
 2752     Table << MatchTable::Comment(S) << MatchTable::LineBreak;
 2752     Table << MatchTable::Comment(S) << MatchTable::LineBreak;
 2811   void emitActionOpcodes(MatchTable &Table, RuleMatcher &Rule) const override {
 2817       Table << MatchTable::Opcode("GIR_MutateOpcode")
 2818             << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2818             << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2819             << MatchTable::Comment("RecycleInsnID")
 2820             << MatchTable::IntValue(RecycleInsnID)
 2821             << MatchTable::Comment("Opcode")
 2822             << MatchTable::NamedValue(I->Namespace, I->TheDef->getName())
 2823             << MatchTable::LineBreak;
 2830           Table << MatchTable::Opcode("GIR_AddImplicitDef")
 2831                 << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2831                 << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2832                 << MatchTable::NamedValue(Namespace, Def->getName())
 2833                 << MatchTable::LineBreak;
 2839           Table << MatchTable::Opcode("GIR_AddImplicitUse")
 2840                 << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2840                 << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2841                 << MatchTable::NamedValue(Namespace, Use->getName())
 2842                 << MatchTable::LineBreak;
 2851     Table << MatchTable::Opcode("GIR_BuildMI") << MatchTable::Comment("InsnID")
 2851     Table << MatchTable::Opcode("GIR_BuildMI") << MatchTable::Comment("InsnID")
 2852           << MatchTable::IntValue(InsnID) << MatchTable::Comment("Opcode")
 2852           << MatchTable::IntValue(InsnID) << MatchTable::Comment("Opcode")
 2853           << MatchTable::NamedValue(I->Namespace, I->TheDef->getName())
 2854           << MatchTable::LineBreak;
 2859       Table << MatchTable::Opcode("GIR_MergeMemOperands")
 2860             << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2860             << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2861             << MatchTable::Comment("MergeInsnID's");
 2874         Table << MatchTable::IntValue(MergeInsnID);
 2875       Table << MatchTable::NamedValue("GIU_MergeMemOperands_EndOfList")
 2876             << MatchTable::LineBreak;
 2883       Table << MatchTable::Opcode("GIR_EraseFromParent")
 2884             << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2884             << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2885             << MatchTable::LineBreak;
 2897   void emitActionOpcodes(MatchTable &Table, RuleMatcher &Rule) const override {
 2898     Table << MatchTable::Opcode("GIR_ConstrainSelectedInstOperands")
 2899           << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2899           << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2900           << MatchTable::LineBreak;
 2916   void emitActionOpcodes(MatchTable &Table, RuleMatcher &Rule) const override {
 2917     Table << MatchTable::Opcode("GIR_ConstrainOperandRC")
 2918           << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2918           << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 2919           << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx)
 2919           << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx)
 2920           << MatchTable::Comment("RC " + RC.getName())
 2921           << MatchTable::IntValue(RC.EnumValue) << MatchTable::LineBreak;
 2921           << MatchTable::IntValue(RC.EnumValue) << MatchTable::LineBreak;
 2938   void emitActionOpcodes(MatchTable &Table, RuleMatcher &Rule) const override {
 2939     Table << MatchTable::Opcode("GIR_MakeTempReg")
 2940           << MatchTable::Comment("TempRegID") << MatchTable::IntValue(TempRegID)
 2940           << MatchTable::Comment("TempRegID") << MatchTable::IntValue(TempRegID)
 2941           << MatchTable::Comment("TypeID")
 2942           << MatchTable::NamedValue(Ty.getCxxEnumValue())
 2943           << MatchTable::LineBreak;
 3050 void RuleMatcher::emit(MatchTable &Table) {
 3066   Table << MatchTable::Opcode("GIM_Try", +1)
 3067         << MatchTable::Comment("On fail goto")
 3068         << MatchTable::JumpTarget(LabelID)
 3069         << MatchTable::Comment(("Rule ID " + Twine(RuleID) + " //").str())
 3070         << MatchTable::LineBreak;
 3073     Table << MatchTable::Opcode("GIM_CheckFeatures")
 3074           << MatchTable::NamedValue(getNameForFeatureBitset(RequiredFeatures))
 3075           << MatchTable::LineBreak;
 3096       Table << MatchTable::Opcode("GIM_CheckIsSafeToFold")
 3097             << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 3097             << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
 3098             << MatchTable::LineBreak;
 3144     Table << MatchTable::Opcode("GIR_Coverage") << MatchTable::IntValue(RuleID)
 3144     Table << MatchTable::Opcode("GIR_Coverage") << MatchTable::IntValue(RuleID)
 3145           << MatchTable::LineBreak;
 3147     Table << MatchTable::Comment(("GIR_Coverage, " + Twine(RuleID) + ",").str())
 3148           << MatchTable::LineBreak;
 3150   Table << MatchTable::Opcode("GIR_Done", -1) << MatchTable::LineBreak
 3150   Table << MatchTable::Opcode("GIR_Done", -1) << MatchTable::LineBreak
 3151         << MatchTable::Label(LabelID);
 3212 void SameOperandMatcher::emitPredicateOpcodes(MatchTable &Table,
 3218   Table << MatchTable::Opcode("GIM_CheckIsSameOperand")
 3219         << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 3219         << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
 3220         << MatchTable::Comment("OpIdx") << MatchTable::IntValue(OpIdx)
 3220         << MatchTable::Comment("OpIdx") << MatchTable::IntValue(OpIdx)
 3221         << MatchTable::Comment("OtherMI")
 3222         << MatchTable::IntValue(OtherInsnVarID)
 3223         << MatchTable::Comment("OtherOpIdx")
 3224         << MatchTable::IntValue(OtherOM.getOpIdx())
 3225         << MatchTable::LineBreak;
 3328   MatchTable buildMatchTable(MutableArrayRef<RuleMatcher> Rules, bool Optimize,
 4925 MatchTable
 4933     return MatchTable::buildTable(InputRules, WithCoverage);
 4966   return MatchTable::buildTable(OptRules, WithCoverage);
 5292   const MatchTable Table =
 5460 void GroupMatcher::emit(MatchTable &Table) {
 5464     Table << MatchTable::Opcode("GIM_Try", +1)
 5465           << MatchTable::Comment("On fail goto")
 5466           << MatchTable::JumpTarget(LabelID) << MatchTable::LineBreak;
 5466           << MatchTable::JumpTarget(LabelID) << MatchTable::LineBreak;
 5477     Table << MatchTable::Opcode("GIM_Reject", -1) << MatchTable::LineBreak
 5477     Table << MatchTable::Opcode("GIM_Reject", -1) << MatchTable::LineBreak
 5478           << MatchTable::Label(LabelID);
 5550                                                  MatchTable &Table) {
 5554     Table << MatchTable::Opcode("GIM_SwitchOpcode") << MatchTable::Comment("MI")
 5554     Table << MatchTable::Opcode("GIM_SwitchOpcode") << MatchTable::Comment("MI")
 5555           << MatchTable::IntValue(Condition->getInsnVarID());
 5559     Table << MatchTable::Opcode("GIM_SwitchType") << MatchTable::Comment("MI")
 5559     Table << MatchTable::Opcode("GIM_SwitchType") << MatchTable::Comment("MI")
 5560           << MatchTable::IntValue(Condition->getInsnVarID())
 5561           << MatchTable::Comment("Op")
 5562           << MatchTable::IntValue(Condition->getOpIdx());
 5570 void SwitchMatcher::emit(MatchTable &Table) {
 5587   Table << MatchTable::Comment("[") << MatchTable::IntValue(LowerBound)
 5587   Table << MatchTable::Comment("[") << MatchTable::IntValue(LowerBound)
 5588         << MatchTable::IntValue(UpperBound) << MatchTable::Comment(")")
 5588         << MatchTable::IntValue(UpperBound) << MatchTable::Comment(")")
 5589         << MatchTable::Comment("default:") << MatchTable::JumpTarget(Default);
 5589         << MatchTable::Comment("default:") << MatchTable::JumpTarget(Default);
 5596       Table << MatchTable::IntValue(0);
 5598     Table << MatchTable::LineBreak << V << MatchTable::JumpTarget(LabelIDs[I]);
 5598     Table << MatchTable::LineBreak << V << MatchTable::JumpTarget(LabelIDs[I]);
 5600   Table << MatchTable::LineBreak;
 5603     Table << MatchTable::Label(LabelIDs[I]);
 5605     Table << MatchTable::Opcode("GIM_Reject") << MatchTable::LineBreak;
 5605     Table << MatchTable::Opcode("GIM_Reject") << MatchTable::LineBreak;
 5607   Table << MatchTable::Label(Default);