Lines Matching refs:MatchTable
402 class MatchTable;
479 const MatchTable &Table) const;
487 class MatchTable { class
553 static MatchTable buildTable(ArrayRef<Matcher *> Rules, bool WithCoverage);
555 MatchTable(bool WithCoverage, unsigned ID = 0) in MatchTable() function in __anon4852db4a0111::MatchTable
612 MatchTableRecord MatchTable::LineBreak = {
617 const MatchTable &Table) const { in emit()
649 MatchTable &operator<<(MatchTable &Table, const MatchTableRecord &Value) { in operator <<()
665 virtual void emit(MatchTable &Table) = 0;
672 MatchTable MatchTable::buildTable(ArrayRef<Matcher *> Rules, in buildTable()
674 MatchTable Table(WithCoverage); in buildTable()
678 return Table << MatchTable::Opcode("GIM_Reject") << MatchTable::LineBreak; in buildTable()
721 void emit(MatchTable &Table) override;
776 void emit(MatchTable &Table) override;
803 MatchTable &Table);
968 void emit(MatchTable &Table) override;
1055 void emitPredicateListOpcodes(MatchTable &Table, Args &&... args) { in emitPredicateListOpcodes()
1057 Table << MatchTable::Comment(getNoPredicateComment()) in emitPredicateListOpcodes()
1058 << MatchTable::LineBreak; in emitPredicateListOpcodes()
1075 MatchTable &Table, Args &&... args) { in emitFilteredPredicateListOpcodes()
1077 Table << MatchTable::Comment(getNoPredicateComment()) in emitFilteredPredicateListOpcodes()
1078 << MatchTable::LineBreak; in emitFilteredPredicateListOpcodes()
1141 virtual void emitPredicateOpcodes(MatchTable &Table,
1212 void emitPredicateOpcodes(MatchTable &Table,
1252 return MatchTable::NamedValue(getTy().getCxxEnumValue()); in getValue()
1253 return MatchTable::NamedValue(getTy().getCxxEnumValue(), VI->second); in getValue()
1263 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
1265 Table << MatchTable::Opcode("GIM_CheckType") << MatchTable::Comment("MI") in emitPredicateOpcodes()
1266 << MatchTable::IntValue(InsnVarID) << MatchTable::Comment("Op") in emitPredicateOpcodes()
1267 << MatchTable::IntValue(OpIdx) << MatchTable::Comment("Type") in emitPredicateOpcodes()
1268 << getValue() << MatchTable::LineBreak; in emitPredicateOpcodes()
1303 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
1305 Table << MatchTable::Opcode("GIM_CheckPointerToAny") in emitPredicateOpcodes()
1306 << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID) in emitPredicateOpcodes()
1307 << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx) in emitPredicateOpcodes()
1308 << MatchTable::Comment("SizeInBits") in emitPredicateOpcodes()
1309 << MatchTable::IntValue(SizeInBits) << MatchTable::LineBreak; in emitPredicateOpcodes()
1337 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
1339 Table << MatchTable::Opcode("GIM_RecordNamedOperand") in emitPredicateOpcodes()
1340 << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID) in emitPredicateOpcodes()
1341 << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx) in emitPredicateOpcodes()
1342 << MatchTable::Comment("StoreIdx") << MatchTable::IntValue(StoreIdx) in emitPredicateOpcodes()
1343 << MatchTable::Comment("Name : " + Name) << MatchTable::LineBreak; in emitPredicateOpcodes()
1368 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
1371 Table << MatchTable::Opcode("GIM_CheckComplexPattern") in emitPredicateOpcodes()
1372 << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID) in emitPredicateOpcodes()
1373 << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx) in emitPredicateOpcodes()
1374 << MatchTable::Comment("Renderer") << MatchTable::IntValue(ID) in emitPredicateOpcodes()
1375 << MatchTable::NamedValue(("GICP_" + TheDef.getName()).str()) in emitPredicateOpcodes()
1376 << MatchTable::LineBreak; in emitPredicateOpcodes()
1403 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
1405 Table << MatchTable::Opcode("GIM_CheckRegBankForClass") in emitPredicateOpcodes()
1406 << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID) in emitPredicateOpcodes()
1407 << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx) in emitPredicateOpcodes()
1408 << MatchTable::Comment("RC") in emitPredicateOpcodes()
1409 << MatchTable::NamedValue(RC.getQualifiedName() + "RegClassID") in emitPredicateOpcodes()
1410 << MatchTable::LineBreak; in emitPredicateOpcodes()
1424 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
1426 Table << MatchTable::Opcode("GIM_CheckIsMBB") << MatchTable::Comment("MI") in emitPredicateOpcodes()
1427 << MatchTable::IntValue(InsnVarID) << MatchTable::Comment("Op") in emitPredicateOpcodes()
1428 << MatchTable::IntValue(OpIdx) << MatchTable::LineBreak; in emitPredicateOpcodes()
1441 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
1443 Table << MatchTable::Opcode("GIM_CheckIsImm") << MatchTable::Comment("MI") in emitPredicateOpcodes()
1444 << MatchTable::IntValue(InsnVarID) << MatchTable::Comment("Op") in emitPredicateOpcodes()
1445 << MatchTable::IntValue(OpIdx) << MatchTable::LineBreak; in emitPredicateOpcodes()
1468 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
1470 Table << MatchTable::Opcode("GIM_CheckConstantInt") in emitPredicateOpcodes()
1471 << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID) in emitPredicateOpcodes()
1472 << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx) in emitPredicateOpcodes()
1473 << MatchTable::IntValue(Value) << MatchTable::LineBreak; in emitPredicateOpcodes()
1497 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
1499 Table << MatchTable::Opcode("GIM_CheckLiteralInt") in emitPredicateOpcodes()
1500 << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID) in emitPredicateOpcodes()
1501 << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx) in emitPredicateOpcodes()
1502 << MatchTable::IntValue(Value) << MatchTable::LineBreak; in emitPredicateOpcodes()
1525 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
1527 Table << MatchTable::Opcode("GIM_CheckCmpPredicate") in emitPredicateOpcodes()
1528 << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID) in emitPredicateOpcodes()
1529 << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx) in emitPredicateOpcodes()
1530 << MatchTable::Comment("Predicate") in emitPredicateOpcodes()
1531 << MatchTable::NamedValue("CmpInst", PredName) in emitPredicateOpcodes()
1532 << MatchTable::LineBreak; in emitPredicateOpcodes()
1555 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
1557 Table << MatchTable::Opcode("GIM_CheckIntrinsicID") in emitPredicateOpcodes()
1558 << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID) in emitPredicateOpcodes()
1559 << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx) in emitPredicateOpcodes()
1560 << MatchTable::NamedValue("Intrinsic::" + II->EnumName) in emitPredicateOpcodes()
1561 << MatchTable::LineBreak; in emitPredicateOpcodes()
1617 void emitPredicateOpcodes(MatchTable &Table, RuleMatcher &Rule) { in emitPredicateOpcodes()
1626 Table << MatchTable::Comment(CommentOS.str()) << MatchTable::LineBreak; in emitPredicateOpcodes()
1745 return MatchTable::NamedValue(I->Namespace, I->TheDef->getName(), in getInstValue()
1747 return MatchTable::NamedValue(I->Namespace, I->TheDef->getName()); in getInstValue()
1788 return MatchTable::NamedValue(I->Namespace, I->TheDef->getName(), in getValue()
1790 return MatchTable::NamedValue(I->Namespace, I->TheDef->getName()); in getValue()
1793 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
1797 Table << MatchTable::Opcode(CheckType) << MatchTable::Comment("MI") in emitPredicateOpcodes()
1798 << MatchTable::IntValue(InsnVarID); in emitPredicateOpcodes()
1802 Table << MatchTable::LineBreak; in emitPredicateOpcodes()
1869 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
1871 Table << MatchTable::Opcode("GIM_CheckNumOperands") in emitPredicateOpcodes()
1872 << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID) in emitPredicateOpcodes()
1873 << MatchTable::Comment("Expected") in emitPredicateOpcodes()
1874 << MatchTable::IntValue(NumOperands) << MatchTable::LineBreak; in emitPredicateOpcodes()
1925 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
1927 Table << MatchTable::Opcode(getMatchOpcodeForPredicate(Predicate)) in emitPredicateOpcodes()
1928 << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID) in emitPredicateOpcodes()
1929 << MatchTable::Comment("Predicate") in emitPredicateOpcodes()
1930 << MatchTable::NamedValue(getEnumNameForPredicate(Predicate)) in emitPredicateOpcodes()
1931 << MatchTable::LineBreak; in emitPredicateOpcodes()
1966 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
1975 Table << MatchTable::Opcode(Opcode) << MatchTable::Comment("MI") in emitPredicateOpcodes()
1976 << MatchTable::IntValue(InsnVarID) << MatchTable::Comment("Order") in emitPredicateOpcodes()
1977 << MatchTable::NamedValue(("(int64_t)AtomicOrdering::" + Order).str()) in emitPredicateOpcodes()
1978 << MatchTable::LineBreak; in emitPredicateOpcodes()
2002 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
2004 Table << MatchTable::Opcode("GIM_CheckMemorySizeEqualTo") in emitPredicateOpcodes()
2005 << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID) in emitPredicateOpcodes()
2006 << MatchTable::Comment("MMO") << MatchTable::IntValue(MMOIdx) in emitPredicateOpcodes()
2007 << MatchTable::Comment("Size") << MatchTable::IntValue(Size) in emitPredicateOpcodes()
2008 << MatchTable::LineBreak; in emitPredicateOpcodes()
2033 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
2035 Table << MatchTable::Opcode("GIM_CheckMemoryAddressSpace") in emitPredicateOpcodes()
2036 << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID) in emitPredicateOpcodes()
2037 << MatchTable::Comment("MMO") << MatchTable::IntValue(MMOIdx) in emitPredicateOpcodes()
2039 << MatchTable::Comment("NumAddrSpace") in emitPredicateOpcodes()
2040 << MatchTable::IntValue(AddrSpaces.size()); in emitPredicateOpcodes()
2042 Table << MatchTable::Comment("AddrSpace") << MatchTable::IntValue(AS); in emitPredicateOpcodes()
2044 Table << MatchTable::LineBreak; in emitPredicateOpcodes()
2072 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
2074 Table << MatchTable::Opcode("GIM_CheckMemoryAlignment") in emitPredicateOpcodes()
2075 << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID) in emitPredicateOpcodes()
2076 << MatchTable::Comment("MMO") << MatchTable::IntValue(MMOIdx) in emitPredicateOpcodes()
2077 << MatchTable::Comment("MinAlign") << MatchTable::IntValue(MinAlign) in emitPredicateOpcodes()
2078 << MatchTable::LineBreak; in emitPredicateOpcodes()
2114 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
2116 Table << MatchTable::Opcode(Relation == EqualTo in emitPredicateOpcodes()
2121 << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID) in emitPredicateOpcodes()
2122 << MatchTable::Comment("MMO") << MatchTable::IntValue(MMOIdx) in emitPredicateOpcodes()
2123 << MatchTable::Comment("OpIdx") << MatchTable::IntValue(OpIdx) in emitPredicateOpcodes()
2124 << MatchTable::LineBreak; in emitPredicateOpcodes()
2152 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
2155 Table << MatchTable::Opcode("GIM_CheckIsBuildVectorAllOnes"); in emitPredicateOpcodes()
2157 Table << MatchTable::Opcode("GIM_CheckIsBuildVectorAllZeros"); in emitPredicateOpcodes()
2159 Table << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID); in emitPredicateOpcodes()
2160 Table << MatchTable::LineBreak; in emitPredicateOpcodes()
2184 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
2186 Table << MatchTable::Opcode("GIM_CheckCxxInsnPredicate") in emitPredicateOpcodes()
2187 << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID) in emitPredicateOpcodes()
2188 << MatchTable::Comment("FnId") in emitPredicateOpcodes()
2189 << MatchTable::NamedValue(getEnumNameForPredicate(Predicate)) in emitPredicateOpcodes()
2190 << MatchTable::LineBreak; in emitPredicateOpcodes()
2295 void emitPredicateOpcodes(MatchTable &Table, RuleMatcher &Rule) { in emitPredicateOpcodes()
2422 void emitCaptureOpcodes(MatchTable &Table, RuleMatcher &Rule) const { in emitCaptureOpcodes()
2424 Table << MatchTable::Opcode("GIM_RecordInsn") in emitCaptureOpcodes()
2425 << MatchTable::Comment("DefineMI") in emitCaptureOpcodes()
2426 << MatchTable::IntValue(NewInsnVarID) << MatchTable::Comment("MI") in emitCaptureOpcodes()
2427 << MatchTable::IntValue(getInsnVarID()) in emitCaptureOpcodes()
2428 << MatchTable::Comment("OpIdx") << MatchTable::IntValue(getOpIdx()) in emitCaptureOpcodes()
2429 << MatchTable::Comment("MIs[" + llvm::to_string(NewInsnVarID) + "]") in emitCaptureOpcodes()
2430 << MatchTable::LineBreak; in emitCaptureOpcodes()
2433 void emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
2517 virtual void emitRenderOpcodes(MatchTable &Table,
2542 void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override { in emitRenderOpcodes()
2545 Table << MatchTable::Opcode("GIR_Copy") << MatchTable::Comment("NewInsnID") in emitRenderOpcodes()
2546 << MatchTable::IntValue(NewInsnID) << MatchTable::Comment("OldInsnID") in emitRenderOpcodes()
2547 << MatchTable::IntValue(OldInsnVarID) << MatchTable::Comment("OpIdx") in emitRenderOpcodes()
2548 << MatchTable::IntValue(Operand.getOpIdx()) in emitRenderOpcodes()
2549 << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak; in emitRenderOpcodes()
2573 void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override { in emitRenderOpcodes()
2576 Table << MatchTable::Opcode("GIR_Copy") << MatchTable::Comment("NewInsnID") in emitRenderOpcodes()
2577 << MatchTable::IntValue(NewInsnID) << MatchTable::Comment("OldInsnID") in emitRenderOpcodes()
2578 << MatchTable::IntValue(OldInsnVarID) << MatchTable::Comment("OpIdx") in emitRenderOpcodes()
2579 << MatchTable::IntValue(Operand.getOpIdx()) in emitRenderOpcodes()
2580 << MatchTable::Comment(PhysReg->getName()) in emitRenderOpcodes()
2581 << MatchTable::LineBreak; in emitRenderOpcodes()
2609 void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override { in emitRenderOpcodes()
2612 Table << MatchTable::Opcode("GIR_CopyOrAddZeroReg") in emitRenderOpcodes()
2613 << MatchTable::Comment("NewInsnID") << MatchTable::IntValue(NewInsnID) in emitRenderOpcodes()
2614 << MatchTable::Comment("OldInsnID") in emitRenderOpcodes()
2615 << MatchTable::IntValue(OldInsnVarID) << MatchTable::Comment("OpIdx") in emitRenderOpcodes()
2616 << MatchTable::IntValue(Operand.getOpIdx()) in emitRenderOpcodes()
2617 << MatchTable::NamedValue( in emitRenderOpcodes()
2622 << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak; in emitRenderOpcodes()
2646 void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override { in emitRenderOpcodes()
2649 Table << MatchTable::Opcode(Signed ? "GIR_CopyConstantAsSImm" in emitRenderOpcodes()
2651 << MatchTable::Comment("NewInsnID") << MatchTable::IntValue(NewInsnID) in emitRenderOpcodes()
2652 << MatchTable::Comment("OldInsnID") in emitRenderOpcodes()
2653 << MatchTable::IntValue(OldInsnVarID) in emitRenderOpcodes()
2654 << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak; in emitRenderOpcodes()
2677 void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override { in emitRenderOpcodes()
2680 Table << MatchTable::Opcode("GIR_CopyFConstantAsFPImm") in emitRenderOpcodes()
2681 << MatchTable::Comment("NewInsnID") << MatchTable::IntValue(NewInsnID) in emitRenderOpcodes()
2682 << MatchTable::Comment("OldInsnID") in emitRenderOpcodes()
2683 << MatchTable::IntValue(OldInsnVarID) in emitRenderOpcodes()
2684 << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak; in emitRenderOpcodes()
2711 void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override { in emitRenderOpcodes()
2714 Table << MatchTable::Opcode("GIR_CopySubReg") in emitRenderOpcodes()
2715 << MatchTable::Comment("NewInsnID") << MatchTable::IntValue(NewInsnID) in emitRenderOpcodes()
2716 << MatchTable::Comment("OldInsnID") in emitRenderOpcodes()
2717 << MatchTable::IntValue(OldInsnVarID) << MatchTable::Comment("OpIdx") in emitRenderOpcodes()
2718 << MatchTable::IntValue(Operand.getOpIdx()) in emitRenderOpcodes()
2719 << MatchTable::Comment("SubRegIdx") in emitRenderOpcodes()
2720 << MatchTable::IntValue(SubReg->EnumValue) in emitRenderOpcodes()
2721 << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak; in emitRenderOpcodes()
2744 void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override { in emitRenderOpcodes()
2745 Table << MatchTable::Opcode("GIR_AddRegister") in emitRenderOpcodes()
2746 << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID); in emitRenderOpcodes()
2748 Table << MatchTable::NamedValue( in emitRenderOpcodes()
2754 Table << MatchTable::NamedValue(Target.getRegNamespace(), "NoRegister"); in emitRenderOpcodes()
2756 Table << MatchTable::Comment("AddRegisterRegFlags"); in emitRenderOpcodes()
2762 Table << MatchTable::NamedValue("RegState::Define"); in emitRenderOpcodes()
2764 Table << MatchTable::IntValue(0); in emitRenderOpcodes()
2765 Table << MatchTable::LineBreak; in emitRenderOpcodes()
2791 void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override { in emitRenderOpcodes()
2794 Table << MatchTable::Opcode("GIR_AddTempSubRegister"); in emitRenderOpcodes()
2796 Table << MatchTable::Opcode("GIR_AddTempRegister"); in emitRenderOpcodes()
2798 Table << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID) in emitRenderOpcodes()
2799 << MatchTable::Comment("TempRegID") << MatchTable::IntValue(TempRegID) in emitRenderOpcodes()
2800 << MatchTable::Comment("TempRegFlags"); in emitRenderOpcodes()
2807 Table << MatchTable::NamedValue(RegFlags); in emitRenderOpcodes()
2809 Table << MatchTable::IntValue(0); in emitRenderOpcodes()
2812 Table << MatchTable::NamedValue(SubRegIdx->getQualifiedName()); in emitRenderOpcodes()
2813 Table << MatchTable::LineBreak; in emitRenderOpcodes()
2831 void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override { in emitRenderOpcodes()
2832 Table << MatchTable::Opcode("GIR_AddImm") << MatchTable::Comment("InsnID") in emitRenderOpcodes()
2833 << MatchTable::IntValue(InsnID) << MatchTable::Comment("Imm") in emitRenderOpcodes()
2834 << MatchTable::IntValue(Imm) << MatchTable::LineBreak; in emitRenderOpcodes()
2852 void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override { in emitRenderOpcodes()
2853 Table << MatchTable::Opcode("GIR_AddImm") << MatchTable::Comment("InsnID") in emitRenderOpcodes()
2854 << MatchTable::IntValue(InsnID) << MatchTable::Comment("SubRegIndex") in emitRenderOpcodes()
2855 << MatchTable::IntValue(SubRegIdx->EnumValue) in emitRenderOpcodes()
2856 << MatchTable::LineBreak; in emitRenderOpcodes()
2891 void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override { in emitRenderOpcodes()
2892 Table << MatchTable::Opcode(SubOperand.hasValue() ? "GIR_ComplexSubOperandRenderer" in emitRenderOpcodes()
2894 << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID) in emitRenderOpcodes()
2895 << MatchTable::Comment("RendererID") in emitRenderOpcodes()
2896 << MatchTable::IntValue(RendererID); in emitRenderOpcodes()
2898 Table << MatchTable::Comment("SubOperand") in emitRenderOpcodes()
2899 << MatchTable::IntValue(SubOperand.getValue()); in emitRenderOpcodes()
2900 Table << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak; in emitRenderOpcodes()
2921 void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override { in emitRenderOpcodes()
2924 Table << MatchTable::Opcode("GIR_CustomRenderer") in emitRenderOpcodes()
2925 << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID) in emitRenderOpcodes()
2926 << MatchTable::Comment("OldInsnID") in emitRenderOpcodes()
2927 << MatchTable::IntValue(OldInsnVarID) in emitRenderOpcodes()
2928 << MatchTable::Comment("Renderer") in emitRenderOpcodes()
2929 << MatchTable::NamedValue( in emitRenderOpcodes()
2931 << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak; in emitRenderOpcodes()
2952 void emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule) const override { in emitRenderOpcodes()
2954 Table << MatchTable::Opcode("GIR_CustomOperandRenderer") in emitRenderOpcodes()
2955 << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID) in emitRenderOpcodes()
2956 << MatchTable::Comment("OldInsnID") in emitRenderOpcodes()
2957 << MatchTable::IntValue(OpdMatcher.getInsnVarID()) in emitRenderOpcodes()
2958 << MatchTable::Comment("OpIdx") in emitRenderOpcodes()
2959 << MatchTable::IntValue(OpdMatcher.getOpIdx()) in emitRenderOpcodes()
2960 << MatchTable::Comment("OperandRenderer") in emitRenderOpcodes()
2961 << MatchTable::NamedValue( in emitRenderOpcodes()
2963 << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak; in emitRenderOpcodes()
2977 virtual void emitActionOpcodes(MatchTable &Table,
2989 void emitActionOpcodes(MatchTable &Table, RuleMatcher &Rule) const override { in emitActionOpcodes()
2990 Table << MatchTable::Comment(S) << MatchTable::LineBreak; in emitActionOpcodes()
3049 void emitActionOpcodes(MatchTable &Table, RuleMatcher &Rule) const override { in emitActionOpcodes()
3055 Table << MatchTable::Opcode("GIR_MutateOpcode") in emitActionOpcodes()
3056 << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID) in emitActionOpcodes()
3057 << MatchTable::Comment("RecycleInsnID") in emitActionOpcodes()
3058 << MatchTable::IntValue(RecycleInsnID) in emitActionOpcodes()
3059 << MatchTable::Comment("Opcode") in emitActionOpcodes()
3060 << MatchTable::NamedValue(I->Namespace, I->TheDef->getName()) in emitActionOpcodes()
3061 << MatchTable::LineBreak; in emitActionOpcodes()
3068 Table << MatchTable::Opcode("GIR_AddImplicitDef") in emitActionOpcodes()
3069 << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID) in emitActionOpcodes()
3070 << MatchTable::NamedValue(Namespace, Def->getName()) in emitActionOpcodes()
3071 << MatchTable::LineBreak; in emitActionOpcodes()
3077 Table << MatchTable::Opcode("GIR_AddImplicitUse") in emitActionOpcodes()
3078 << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID) in emitActionOpcodes()
3079 << MatchTable::NamedValue(Namespace, Use->getName()) in emitActionOpcodes()
3080 << MatchTable::LineBreak; in emitActionOpcodes()
3089 Table << MatchTable::Opcode("GIR_BuildMI") << MatchTable::Comment("InsnID") in emitActionOpcodes()
3090 << MatchTable::IntValue(InsnID) << MatchTable::Comment("Opcode") in emitActionOpcodes()
3091 << MatchTable::NamedValue(I->Namespace, I->TheDef->getName()) in emitActionOpcodes()
3092 << MatchTable::LineBreak; in emitActionOpcodes()
3097 Table << MatchTable::Opcode("GIR_MergeMemOperands") in emitActionOpcodes()
3098 << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID) in emitActionOpcodes()
3099 << MatchTable::Comment("MergeInsnID's"); in emitActionOpcodes()
3112 Table << MatchTable::IntValue(MergeInsnID); in emitActionOpcodes()
3113 Table << MatchTable::NamedValue("GIU_MergeMemOperands_EndOfList") in emitActionOpcodes()
3114 << MatchTable::LineBreak; in emitActionOpcodes()
3121 Table << MatchTable::Opcode("GIR_EraseFromParent") in emitActionOpcodes()
3122 << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID) in emitActionOpcodes()
3123 << MatchTable::LineBreak; in emitActionOpcodes()
3135 void emitActionOpcodes(MatchTable &Table, RuleMatcher &Rule) const override { in emitActionOpcodes()
3136 Table << MatchTable::Opcode("GIR_ConstrainSelectedInstOperands") in emitActionOpcodes()
3137 << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID) in emitActionOpcodes()
3138 << MatchTable::LineBreak; in emitActionOpcodes()
3154 void emitActionOpcodes(MatchTable &Table, RuleMatcher &Rule) const override { in emitActionOpcodes()
3155 Table << MatchTable::Opcode("GIR_ConstrainOperandRC") in emitActionOpcodes()
3156 << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID) in emitActionOpcodes()
3157 << MatchTable::Comment("Op") << MatchTable::IntValue(OpIdx) in emitActionOpcodes()
3158 << MatchTable::NamedValue(RC.getQualifiedName() + "RegClassID") in emitActionOpcodes()
3159 << MatchTable::LineBreak; in emitActionOpcodes()
3176 void emitActionOpcodes(MatchTable &Table, RuleMatcher &Rule) const override { in emitActionOpcodes()
3177 Table << MatchTable::Opcode("GIR_MakeTempReg") in emitActionOpcodes()
3178 << MatchTable::Comment("TempRegID") << MatchTable::IntValue(TempRegID) in emitActionOpcodes()
3179 << MatchTable::Comment("TypeID") in emitActionOpcodes()
3180 << MatchTable::NamedValue(Ty.getCxxEnumValue()) in emitActionOpcodes()
3181 << MatchTable::LineBreak; in emitActionOpcodes()
3288 void RuleMatcher::emit(MatchTable &Table) { in emit()
3304 Table << MatchTable::Opcode("GIM_Try", +1) in emit()
3305 << MatchTable::Comment("On fail goto") in emit()
3306 << MatchTable::JumpTarget(LabelID) in emit()
3307 << MatchTable::Comment(("Rule ID " + Twine(RuleID) + " //").str()) in emit()
3308 << MatchTable::LineBreak; in emit()
3311 Table << MatchTable::Opcode("GIM_CheckFeatures") in emit()
3312 << MatchTable::NamedValue(getNameForFeatureBitset(RequiredFeatures)) in emit()
3313 << MatchTable::LineBreak; in emit()
3334 Table << MatchTable::Opcode("GIM_CheckIsSafeToFold") in emit()
3335 << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID) in emit()
3336 << MatchTable::LineBreak; in emit()
3382 Table << MatchTable::Opcode("GIR_Coverage") << MatchTable::IntValue(RuleID) in emit()
3383 << MatchTable::LineBreak; in emit()
3385 Table << MatchTable::Comment(("GIR_Coverage, " + Twine(RuleID) + ",").str()) in emit()
3386 << MatchTable::LineBreak; in emit()
3388 Table << MatchTable::Opcode("GIR_Done", -1) << MatchTable::LineBreak in emit()
3389 << MatchTable::Label(LabelID); in emit()
3450 void SameOperandMatcher::emitPredicateOpcodes(MatchTable &Table, in emitPredicateOpcodes()
3456 Table << MatchTable::Opcode("GIM_CheckIsSameOperand") in emitPredicateOpcodes()
3457 << MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID) in emitPredicateOpcodes()
3458 << MatchTable::Comment("OpIdx") << MatchTable::IntValue(OpIdx) in emitPredicateOpcodes()
3459 << MatchTable::Comment("OtherMI") in emitPredicateOpcodes()
3460 << MatchTable::IntValue(OtherInsnVarID) in emitPredicateOpcodes()
3461 << MatchTable::Comment("OtherOpIdx") in emitPredicateOpcodes()
3462 << MatchTable::IntValue(OtherOM.getOpIdx()) in emitPredicateOpcodes()
3463 << MatchTable::LineBreak; in emitPredicateOpcodes()
3597 MatchTable buildMatchTable(MutableArrayRef<RuleMatcher> Rules, bool Optimize,
5462 MatchTable
5470 return MatchTable::buildTable(InputRules, WithCoverage); in buildMatchTable()
5503 return MatchTable::buildTable(OptRules, WithCoverage); in buildMatchTable()
5841 const MatchTable Table = in run()
6010 void GroupMatcher::emit(MatchTable &Table) { in emit()
6014 Table << MatchTable::Opcode("GIM_Try", +1) in emit()
6015 << MatchTable::Comment("On fail goto") in emit()
6016 << MatchTable::JumpTarget(LabelID) << MatchTable::LineBreak; in emit()
6027 Table << MatchTable::Opcode("GIM_Reject", -1) << MatchTable::LineBreak in emit()
6028 << MatchTable::Label(LabelID); in emit()
6100 MatchTable &Table) { in emitPredicateSpecificOpcodes()
6104 Table << MatchTable::Opcode("GIM_SwitchOpcode") << MatchTable::Comment("MI") in emitPredicateSpecificOpcodes()
6105 << MatchTable::IntValue(Condition->getInsnVarID()); in emitPredicateSpecificOpcodes()
6109 Table << MatchTable::Opcode("GIM_SwitchType") << MatchTable::Comment("MI") in emitPredicateSpecificOpcodes()
6110 << MatchTable::IntValue(Condition->getInsnVarID()) in emitPredicateSpecificOpcodes()
6111 << MatchTable::Comment("Op") in emitPredicateSpecificOpcodes()
6112 << MatchTable::IntValue(Condition->getOpIdx()); in emitPredicateSpecificOpcodes()
6120 void SwitchMatcher::emit(MatchTable &Table) { in emit()
6137 Table << MatchTable::Comment("[") << MatchTable::IntValue(LowerBound) in emit()
6138 << MatchTable::IntValue(UpperBound) << MatchTable::Comment(")") in emit()
6139 << MatchTable::Comment("default:") << MatchTable::JumpTarget(Default); in emit()
6146 Table << MatchTable::IntValue(0); in emit()
6148 Table << MatchTable::LineBreak << V << MatchTable::JumpTarget(LabelIDs[I]); in emit()
6150 Table << MatchTable::LineBreak; in emit()
6153 Table << MatchTable::Label(LabelIDs[I]); in emit()
6155 Table << MatchTable::Opcode("GIM_Reject") << MatchTable::LineBreak; in emit()
6157 Table << MatchTable::Label(Default); in emit()