Lines Matching defs:Table

164                             const MatchTable &Table) const {
179 OS << ": @" << Table.getLabelIndex(LabelID);
188 OS << getEncodedEmitStr(llvm::to_string(Table.getLabelIndex(LabelID)),
333 MatchTable Table(WithCoverage, IsCombiner);
335 Rule->emit(Table);
337 return Table << MatchTable::Opcode("GIM_Reject") << MatchTable::LineBreak;
505 void GroupMatcher::emit(MatchTable &Table) {
508 LabelID = Table.allocateLabelID();
509 Table << MatchTable::Opcode("GIM_Try", +1)
515 Table, *static_cast<RuleMatcher *>(*Matchers.begin()));
518 M->emit(Table);
522 Table << MatchTable::Opcode("GIM_Reject", -1) << MatchTable::LineBreak
622 MatchTable &Table) {
626 Table << MatchTable::Opcode("GIM_SwitchOpcode") << MatchTable::Comment("MI")
631 Table << MatchTable::Opcode("GIM_SwitchType") << MatchTable::Comment("MI")
642 void SwitchMatcher::emit(MatchTable &Table) {
651 [&Table]() { return Table.allocateLabelID(); });
652 const unsigned Default = Table.allocateLabelID();
657 emitPredicateSpecificOpcodes(*Condition, Table);
659 Table << MatchTable::Comment("[") << MatchTable::IntValue(2, LowerBound)
668 Table << MatchTable::IntValue(4, 0);
670 Table << MatchTable::LineBreak << V << MatchTable::JumpTarget(LabelIDs[I]);
672 Table << MatchTable::LineBreak;
675 Table << MatchTable::Label(LabelIDs[I]);
676 Matchers[I]->emit(Table);
677 Table << MatchTable::Opcode("GIM_Reject") << MatchTable::LineBreak;
679 Table << MatchTable::Label(Default);
931 void RuleMatcher::emit(MatchTable &Table) {
946 unsigned LabelID = Table.allocateLabelID();
947 Table << MatchTable::Opcode("GIM_Try", +1)
954 Table << MatchTable::Opcode("GIM_CheckFeatures")
962 Table << MatchTable::Opcode("GIM_CheckSimplePredicate")
967 Matchers.front()->emitPredicateOpcodes(Table, *this);
971 MA->emitAdditionalPredicates(Table, *this);
1011 Table << MatchTable::Opcode("GIM_CheckIsSafeToFold")
1018 PM->emitPredicateOpcodes(Table, *this);
1022 assert(Table.isCombiner() && "CustomCXXAction is only for combiners!");
1028 MA->emitActionOpcodes(Table, *this);
1029 Table << MatchTable::Opcode("GIR_DoneWithCustomAction", -1)
1041 MA->emitActionOpcodes(Table, *this);
1044 assert((Table.isWithCoverage() ? !Table.isCombiner() : true) &&
1046 if (Table.isWithCoverage())
1047 Table << MatchTable::Opcode("GIR_Coverage")
1049 else if (!Table.isCombiner())
1050 Table << MatchTable::Comment(
1055 !Actions.back()->emitActionOpcodesAndDone(Table, *this)) {
1056 Table << MatchTable::Opcode("GIR_Done", -1) << MatchTable::LineBreak;
1060 Table << MatchTable::Label(LabelID);
1126 void SameOperandMatcher::emitPredicateOpcodes(MatchTable &Table,
1132 Table << MatchTable::Opcode(IgnoreCopies
1161 void LLTOperandMatcher::emitPredicateOpcodes(MatchTable &Table,
1164 Table << MatchTable::Opcode("GIM_RootCheckType");
1166 Table << MatchTable::Opcode("GIM_CheckType") << MatchTable::Comment("MI")
1169 Table << MatchTable::Comment("Op") << MatchTable::ULEB128Value(OpIdx)
1175 void PointerToAnyOperandMatcher::emitPredicateOpcodes(MatchTable &Table,
1177 Table << MatchTable::Opcode("GIM_CheckPointerToAny")
1186 void RecordNamedOperandMatcher::emitPredicateOpcodes(MatchTable &Table,
1188 Table << MatchTable::Opcode("GIM_RecordNamedOperand")
1197 void RecordRegisterType::emitPredicateOpcodes(MatchTable &Table,
1200 Table << MatchTable::Opcode("GIM_RecordRegType") << MatchTable::Comment("MI")
1209 MatchTable &Table, RuleMatcher &Rule) const {
1211 Table << MatchTable::Opcode("GIM_CheckComplexPattern")
1230 void RegisterBankOperandMatcher::emitPredicateOpcodes(MatchTable &Table,
1233 Table << MatchTable::Opcode("GIM_RootCheckRegBankForClass");
1235 Table << MatchTable::Opcode("GIM_CheckRegBankForClass")
1239 Table << MatchTable::Comment("Op") << MatchTable::ULEB128Value(OpIdx)
1247 void MBBOperandMatcher::emitPredicateOpcodes(MatchTable &Table,
1249 Table << MatchTable::Opcode("GIM_CheckIsMBB") << MatchTable::Comment("MI")
1256 void ImmOperandMatcher::emitPredicateOpcodes(MatchTable &Table,
1258 Table << MatchTable::Opcode("GIM_CheckIsImm") << MatchTable::Comment("MI")
1265 void ConstantIntOperandMatcher::emitPredicateOpcodes(MatchTable &Table,
1268 Table << MatchTable::Opcode(IsInt8 ? "GIM_CheckConstantInt8"
1277 void LiteralIntOperandMatcher::emitPredicateOpcodes(MatchTable &Table,
1279 Table << MatchTable::Opcode("GIM_CheckLiteralInt")
1287 void CmpPredicateOperandMatcher::emitPredicateOpcodes(MatchTable &Table,
1289 Table << MatchTable::Opcode("GIM_CheckCmpPredicate")
1299 void IntrinsicIDOperandMatcher::emitPredicateOpcodes(MatchTable &Table,
1301 Table << MatchTable::Opcode("GIM_CheckIntrinsicID")
1310 void OperandImmPredicateMatcher::emitPredicateOpcodes(MatchTable &Table,
1312 Table << MatchTable::Opcode("GIM_CheckImmOperandPredicate")
1342 void OperandMatcher::emitPredicateOpcodes(MatchTable &Table,
1352 Table << MatchTable::Comment(Comment) << MatchTable::LineBreak;
1355 emitPredicateListOpcodes(Table, Rule);
1442 void InstructionOpcodeMatcher::emitPredicateOpcodes(MatchTable &Table,
1446 Table << MatchTable::Opcode(CheckType) << MatchTable::Comment("MI")
1450 Table << getInstValue(I);
1451 Table << MatchTable::LineBreak;
1492 MatchTable &Table, RuleMatcher &Rule) const {
1505 Table << MatchTable::Opcode(Opc) << MatchTable::Comment("MI")
1522 MatchTable &Table, RuleMatcher &Rule) const {
1523 Table << MatchTable::Opcode(getMatchOpcodeForImmPredicate(Predicate))
1541 MatchTable &Table, RuleMatcher &Rule) const {
1549 Table << MatchTable::Opcode(Opcode) << MatchTable::Comment("MI")
1558 void MemorySizePredicateMatcher::emitPredicateOpcodes(MatchTable &Table,
1560 Table << MatchTable::Opcode("GIM_CheckMemorySizeEqualTo")
1578 MatchTable &Table, RuleMatcher &Rule) const {
1580 Table << MatchTable::Opcode("GIM_CheckMemoryAddressSpace")
1588 Table << MatchTable::Comment("AddrSpace") << MatchTable::ULEB128Value(AS);
1590 Table << MatchTable::LineBreak;
1604 MatchTable &Table, RuleMatcher &Rule) const {
1608 Table << MatchTable::Opcode("GIM_CheckMemoryAlignment")
1626 MatchTable &Table, RuleMatcher &Rule) const {
1627 Table << MatchTable::Opcode(
1640 MatchTable &Table, RuleMatcher &Rule) const {
1642 Table << MatchTable::Opcode("GIM_CheckIsBuildVectorAllOnes");
1644 Table << MatchTable::Opcode("GIM_CheckIsBuildVectorAllZeros");
1646 Table << MatchTable::Comment("MI") << MatchTable::ULEB128Value(InsnVarID);
1647 Table << MatchTable::LineBreak;
1664 MatchTable &Table, RuleMatcher &Rule) const {
1665 Table << MatchTable::Opcode("GIM_CheckCxxInsnPredicate")
1683 MatchTable &Table, RuleMatcher &Rule) const {
1684 Table << MatchTable::Opcode(CheckNot ? "GIM_MIFlagsNot" : "GIM_MIFlags")
1725 void InstructionMatcher::emitPredicateOpcodes(MatchTable &Table,
1729 .emitPredicateOpcodes(Table, Rule);
1735 [](const PredicateMatcher &P) { return !P.dependsOnOperands(); }, Table,
1740 Operand->emitPredicateOpcodes(Table, Rule);
1745 [](const PredicateMatcher &P) { return P.dependsOnOperands(); }, Table,
1830 void InstructionOperandMatcher::emitCaptureOpcodes(MatchTable &Table,
1834 Table << MatchTable::Opcode(IgnoreCopies ? "GIM_RecordInsnIgnoreCopies"
1864 void CopyRenderer::emitRenderOpcodes(MatchTable &Table, RuleMatcher &Rule,
1869 Table << MatchTable::Opcode("GIR_RootToRootCopy");
1871 Table << MatchTable::Opcode(ForVariadic ? "GIR_CopyRemaining" : "GIR_Copy")
1878 Table << MatchTable::Comment("OpIdx") << MatchTable::ULEB128Value(OpIdx)
1882 void CopyRenderer::emitRenderOpcodes(MatchTable &Table,
1887 emitRenderOpcodes(Table, Rule, NewInsnID, OldInsnVarID, Operand.getOpIdx(),
1893 void CopyPhysRegRenderer::emitRenderOpcodes(MatchTable &Table,
1897 CopyRenderer::emitRenderOpcodes(Table, Rule, NewInsnID, OldInsnVarID,
1903 void CopyOrAddZeroRegRenderer::emitRenderOpcodes(MatchTable &Table,
1907 Table << MatchTable::Opcode("GIR_CopyOrAddZeroReg")
1925 void CopyConstantAsImmRenderer::emitRenderOpcodes(MatchTable &Table,
1929 Table << MatchTable::Opcode(Signed ? "GIR_CopyConstantAsSImm"
1940 void CopyFConstantAsFPImmRenderer::emitRenderOpcodes(MatchTable &Table,
1944 Table << MatchTable::Opcode("GIR_CopyFConstantAsFPImm")
1954 void CopySubRegRenderer::emitRenderOpcodes(MatchTable &Table,
1958 Table << MatchTable::Opcode("GIR_CopySubReg")
1972 void AddRegisterRenderer::emitRenderOpcodes(MatchTable &Table,
1974 Table << MatchTable::Opcode("GIR_AddRegister")
1977 Table << MatchTable::NamedValue(
1984 Table << MatchTable::NamedValue(2, Target.getRegNamespace(), "NoRegister");
1986 Table << MatchTable::Comment("AddRegisterRegFlags");
1992 Table << MatchTable::NamedValue(
1996 Table << MatchTable::IntValue(2, 0);
1998 Table << MatchTable::LineBreak;
2003 void TempRegRenderer::emitRenderOpcodes(MatchTable &Table,
2008 Table << MatchTable::Opcode("GIR_AddTempSubRegister");
2010 Table << MatchTable::Opcode(NeedsFlags ? "GIR_AddTempRegister"
2013 Table << MatchTable::Comment("InsnID") << MatchTable::ULEB128Value(InsnID)
2018 Table << MatchTable::LineBreak;
2022 Table << MatchTable::Comment("TempRegFlags");
2028 Table << MatchTable::NamedValue(2, RegFlags);
2030 Table << MatchTable::IntValue(2, 0);
2033 Table << MatchTable::NamedValue(2, SubRegIdx->getQualifiedName());
2034 Table << MatchTable::LineBreak;
2039 void ImmRenderer::emitAddImm(MatchTable &Table, RuleMatcher &RM,
2043 Table << MatchTable::Opcode(IsInt8 ? "GIR_AddImm8" : "GIR_AddImm")
2049 void ImmRenderer::emitRenderOpcodes(MatchTable &Table,
2052 assert(Table.isCombiner() &&
2054 Table << MatchTable::Opcode("GIR_AddCImm") << MatchTable::Comment("InsnID")
2059 emitAddImm(Table, Rule, InsnID, Imm);
2064 void SubRegIndexRenderer::emitRenderOpcodes(MatchTable &Table,
2066 ImmRenderer::emitAddImm(Table, Rule, InsnID, SubRegIdx->EnumValue,
2072 void RenderComplexPatternOperand::emitRenderOpcodes(MatchTable &Table,
2074 Table << MatchTable::Opcode(
2082 Table << MatchTable::Comment("SubOperand")
2085 Table << MatchTable::Comment("SubRegIdx")
2087 Table << MatchTable::Comment(SymbolicName) << MatchTable::LineBreak;
2092 void IntrinsicIDRenderer::emitRenderOpcodes(MatchTable &Table,
2094 Table << MatchTable::Opcode("GIR_AddIntrinsicID") << MatchTable::Comment("MI")
2102 void CustomRenderer::emitRenderOpcodes(MatchTable &Table,
2106 Table << MatchTable::Opcode("GIR_CustomRenderer")
2118 void CustomOperandRenderer::emitRenderOpcodes(MatchTable &Table,
2121 Table << MatchTable::Opcode("GIR_CustomOperandRenderer")
2168 void BuildMIAction::emitActionOpcodes(MatchTable &Table,
2172 Table << MatchTable::Opcode("GIR_CopyMIFlags")
2180 Table << MatchTable::Opcode("GIR_SetMIFlags")
2187 Table << MatchTable::Opcode("GIR_UnsetMIFlags")
2199 Table << MatchTable::Opcode("GIR_MutateOpcode")
2213 Table << MatchTable::Opcode("GIR_AddImplicitDef")
2225 Table << MatchTable::Opcode("GIR_AddImplicitUse")
2244 Table << MatchTable::Opcode("GIR_BuildRootMI");
2246 Table << MatchTable::Opcode("GIR_BuildMI") << MatchTable::Comment("InsnID")
2250 Table << MatchTable::Comment("Opcode")
2255 Renderer->emitRenderOpcodes(Table, Rule);
2261 Table
2284 Table << MatchTable::Opcode("GIR_MergeMemOperands")
2290 Table << MatchTable::ULEB128Value(MergeInsnID);
2291 Table << MatchTable::LineBreak;
2299 void BuildConstantAction::emitActionOpcodes(MatchTable &Table,
2301 Table << MatchTable::Opcode("GIR_BuildConstant")
2309 void EraseInstAction::emitActionOpcodes(MatchTable &Table,
2315 Table << MatchTable::Opcode("GIR_EraseFromParent")
2320 bool EraseInstAction::emitActionOpcodesAndDone(MatchTable &Table,
2323 emitActionOpcodes(Table, Rule);
2330 Table << MatchTable::Opcode("GIR_EraseRootFromParent_Done", -1)
2337 void ReplaceRegAction::emitAdditionalPredicates(MatchTable &Table,
2342 Table << MatchTable::Opcode("GIM_CheckCanReplaceReg")
2352 void ReplaceRegAction::emitActionOpcodes(MatchTable &Table,
2355 Table << MatchTable::Opcode("GIR_ReplaceRegWithTempReg")
2363 Table << MatchTable::Opcode("GIR_ReplaceReg")
2378 MatchTable &Table, RuleMatcher &Rule) const {
2379 Table << MatchTable::Opcode("GIR_ConstrainOperandRC")
2388 void MakeTempRegisterAction::emitActionOpcodes(MatchTable &Table,
2390 Table << MatchTable::Opcode("GIR_MakeTempReg")