Lines Matching refs:OS

170                            unsigned StartIdx, raw_ostream &OS);
172 unsigned SizeMatcherList(Matcher *N, raw_ostream &OS);
174 void EmitPredicateFunctions(raw_ostream &OS);
176 void EmitHistogram(const Matcher *N, raw_ostream &OS);
178 void EmitPatternMatchTable(raw_ostream &OS);
182 StringRef Decl, raw_ostream &OS);
184 unsigned SizeMatcher(Matcher *N, raw_ostream &OS);
187 unsigned CurrentIdx, raw_ostream &OS);
238 static unsigned EmitVBRValue(uint64_t Val, raw_ostream &OS) { in EmitVBRValue() argument
240 OS << Val << ", "; in EmitVBRValue()
247 OS << (Val & 127) << "|128,"; in EmitVBRValue()
251 OS << Val; in EmitVBRValue()
253 OS << "/*" << InVal << "*/"; in EmitVBRValue()
254 OS << ", "; in EmitVBRValue()
261 static unsigned EmitSignedVBRValue(uint64_t Val, raw_ostream &OS) { in EmitSignedVBRValue() argument
267 return EmitVBRValue(Val, OS); in EmitSignedVBRValue()
292 unsigned MatcherTableEmitter::SizeMatcherList(Matcher *N, raw_ostream &OS) { in SizeMatcherList() argument
295 Size += SizeMatcher(N, OS); in SizeMatcherList()
304 unsigned MatcherTableEmitter::SizeMatcher(Matcher *N, raw_ostream &OS) { in SizeMatcher() argument
316 const unsigned ChildSize = SizeMatcherList(SM->getChild(i), OS); in SizeMatcher()
344 const unsigned ChildSize = SizeMatcherList(Child, OS); in SizeMatcher()
355 return EmitMatcher(N, 0, Idx, OS); in SizeMatcher()
360 static void BeginEmitFunction(raw_ostream &OS, StringRef RetType, in BeginEmitFunction() argument
362 OS << "#ifdef GET_DAGISEL_DECL\n"; in BeginEmitFunction()
363 OS << RetType << ' ' << Decl; in BeginEmitFunction()
365 OS << " override"; in BeginEmitFunction()
366 OS << ";\n" in BeginEmitFunction()
369 OS << RetType << " DAGISEL_CLASS_COLONCOLON " << Decl << "\n"; in BeginEmitFunction()
371 OS << "#if DAGISEL_INLINE\n" in BeginEmitFunction()
377 static void EndEmitFunction(raw_ostream &OS) { in EndEmitFunction() argument
378 OS << "#endif // GET_DAGISEL_BODY\n\n"; in EndEmitFunction()
381 void MatcherTableEmitter::EmitPatternMatchTable(raw_ostream &OS) { in EmitPatternMatchTable() argument
388 BeginEmitFunction(OS, "StringRef", "getPatternForIndex(unsigned Index)", in EmitPatternMatchTable()
390 OS << "{\n"; in EmitPatternMatchTable()
391 OS << "static const char *PATTERN_MATCH_TABLE[] = {\n"; in EmitPatternMatchTable()
394 OS << "\"" << It.first << "\",\n"; in EmitPatternMatchTable()
397 OS << "\n};"; in EmitPatternMatchTable()
398 OS << "\nreturn StringRef(PATTERN_MATCH_TABLE[Index]);"; in EmitPatternMatchTable()
399 OS << "\n}\n"; in EmitPatternMatchTable()
400 EndEmitFunction(OS); in EmitPatternMatchTable()
402 BeginEmitFunction(OS, "StringRef", "getIncludePathForIndex(unsigned Index)", in EmitPatternMatchTable()
404 OS << "{\n"; in EmitPatternMatchTable()
405 OS << "static const char *INCLUDE_PATH_TABLE[] = {\n"; in EmitPatternMatchTable()
408 OS << "\"" << It << "\",\n"; in EmitPatternMatchTable()
411 OS << "\n};"; in EmitPatternMatchTable()
412 OS << "\nreturn StringRef(INCLUDE_PATH_TABLE[Index]);"; in EmitPatternMatchTable()
413 OS << "\n}\n"; in EmitPatternMatchTable()
414 EndEmitFunction(OS); in EmitPatternMatchTable()
422 raw_ostream &OS) { in EmitMatcher() argument
423 OS.indent(Indent); in EmitMatcher()
433 OS << "OPC_Scope, "; in EmitMatcher()
437 OS << "/*" << format_decimal(CurrentIdx, IndexWidth) << "*/"; in EmitMatcher()
438 OS.indent(Indent) << "/*Scope*/ "; in EmitMatcher()
440 OS.indent(Indent); in EmitMatcher()
444 unsigned VBRSize = EmitVBRValue(ChildSize, OS); in EmitMatcher()
446 OS << "/*->" << CurrentIdx + VBRSize + ChildSize << "*/"; in EmitMatcher()
448 OS << " // " << SM->getNumChildren() << " children in Scope"; in EmitMatcher()
450 OS << '\n'; in EmitMatcher()
453 CurrentIdx + VBRSize, OS); in EmitMatcher()
461 OS << "/*" << format_decimal(CurrentIdx, IndexWidth) << "*/"; in EmitMatcher()
462 OS.indent(Indent) << "0, "; in EmitMatcher()
464 OS << "/*End of Scope*/"; in EmitMatcher()
465 OS << '\n'; in EmitMatcher()
470 OS << "OPC_RecordNode,"; in EmitMatcher()
472 OS << " // #" << cast<RecordMatcher>(N)->getResultNo() << " = " in EmitMatcher()
474 OS << '\n'; in EmitMatcher()
478 OS << "OPC_RecordChild" << cast<RecordChildMatcher>(N)->getChildNo() << ','; in EmitMatcher()
480 OS << " // #" << cast<RecordChildMatcher>(N)->getResultNo() << " = " in EmitMatcher()
482 OS << '\n'; in EmitMatcher()
486 OS << "OPC_RecordMemRef,\n"; in EmitMatcher()
490 OS << "OPC_CaptureGlueInput,\n"; in EmitMatcher()
496 OS << "OPC_MoveChild"; in EmitMatcher()
499 OS << ", "; in EmitMatcher()
500 OS << MCM->getChildNo() << ",\n"; in EmitMatcher()
507 OS << "OPC_MoveSibling"; in EmitMatcher()
510 OS << ", "; in EmitMatcher()
511 OS << MSM->getSiblingNo() << ",\n"; in EmitMatcher()
516 OS << "OPC_MoveParent,\n"; in EmitMatcher()
520 OS << "OPC_CheckSame, " << cast<CheckSameMatcher>(N)->getMatchNumber() in EmitMatcher()
525 OS << "OPC_CheckChild" << cast<CheckChildSameMatcher>(N)->getChildNo() in EmitMatcher()
533 OS << "OPC_CheckPatternPredicateTwoByte, TARGET_VAL(" << PredNo << "),"; in EmitMatcher()
535 OS << "OPC_CheckPatternPredicate" << PredNo << ','; in EmitMatcher()
537 OS << "OPC_CheckPatternPredicate, " << PredNo << ','; in EmitMatcher()
539 OS << " // " << Pred; in EmitMatcher()
540 OS << '\n'; in EmitMatcher()
550 OS << "OPC_CheckPredicateWithOperands, " << NumOps << "/*#Ops*/, "; in EmitMatcher()
552 OS << cast<CheckPredicateMatcher>(N)->getOperandNo(i) << ", "; in EmitMatcher()
557 OS << "OPC_CheckPredicate" << PredNo << ", "; in EmitMatcher()
559 OS << "OPC_CheckPredicate, "; in EmitMatcher()
563 OS << PredNo << ','; in EmitMatcher()
565 OS << " // " << Pred.getFnName(); in EmitMatcher()
566 OS << '\n'; in EmitMatcher()
571 OS << "OPC_CheckOpcode, TARGET_VAL(" in EmitMatcher()
581 OS << "OPC_SwitchOpcode "; in EmitMatcher()
584 OS << "OPC_SwitchType "; in EmitMatcher()
589 OS << "/*" << NumCases << " cases */"; in EmitMatcher()
590 OS << ", "; in EmitMatcher()
607 OS << "/*" << format_decimal(CurrentIdx, IndexWidth) << "*/"; in EmitMatcher()
608 OS.indent(Indent); in EmitMatcher()
610 OS << (isa<SwitchOpcodeMatcher>(N) ? "/*SwitchOpcode*/ " in EmitMatcher()
615 CurrentIdx += EmitVBRValue(ChildSize, OS) + IdxSize; in EmitMatcher()
617 OS << "TARGET_VAL(" << SOM->getCaseOpcode(i).getEnumName() << "),"; in EmitMatcher()
619 OS << getEnumName(cast<SwitchTypeMatcher>(N)->getCaseType(i)) << ','; in EmitMatcher()
621 OS << "// ->" << CurrentIdx + ChildSize; in EmitMatcher()
622 OS << '\n'; in EmitMatcher()
624 ChildSize = EmitMatcherList(Child, Indent + 1, CurrentIdx, OS); in EmitMatcher()
632 OS << "/*" << format_decimal(CurrentIdx, IndexWidth) << "*/"; in EmitMatcher()
633 OS.indent(Indent) << "0,"; in EmitMatcher()
635 OS << (isa<SwitchOpcodeMatcher>(N) ? " // EndSwitchOpcode" in EmitMatcher()
638 OS << '\n'; in EmitMatcher()
648 OS << "OPC_CheckTypeI" << MVT(VT).getSizeInBits() << ",\n"; in EmitMatcher()
651 OS << "OPC_CheckType, " << getEnumName(VT) << ",\n"; in EmitMatcher()
655 OS << "OPC_CheckTypeRes, " << cast<CheckTypeMatcher>(N)->getResNo() << ", " in EmitMatcher()
664 OS << "OPC_CheckChild" << cast<CheckChildTypeMatcher>(N)->getChildNo() in EmitMatcher()
668 OS << "OPC_CheckChild" << cast<CheckChildTypeMatcher>(N)->getChildNo() in EmitMatcher()
675 OS << "OPC_CheckInteger, "; in EmitMatcher()
677 1 + EmitSignedVBRValue(cast<CheckIntegerMatcher>(N)->getValue(), OS); in EmitMatcher()
678 OS << '\n'; in EmitMatcher()
682 OS << "OPC_CheckChild" << cast<CheckChildIntegerMatcher>(N)->getChildNo() in EmitMatcher()
685 cast<CheckChildIntegerMatcher>(N)->getValue(), OS); in EmitMatcher()
686 OS << '\n'; in EmitMatcher()
690 OS << "OPC_CheckCondCode, ISD::" in EmitMatcher()
695 OS << "OPC_CheckChild2CondCode, ISD::" in EmitMatcher()
700 OS << "OPC_CheckValueType, " in EmitMatcher()
709 OS << "OPC_CheckComplexPat" << PatternNo << ", /*#*/" in EmitMatcher()
712 OS << "OPC_CheckComplexPat, /*CP*/" << PatternNo << ", /*#*/" in EmitMatcher()
716 OS << " // " << Pattern.getSelectFunc(); in EmitMatcher()
717 OS << ":$" << CCPM->getName(); in EmitMatcher()
719 OS << " #" << CCPM->getFirstResult() + i; in EmitMatcher()
722 OS << " + chain result"; in EmitMatcher()
724 OS << '\n'; in EmitMatcher()
729 OS << "OPC_CheckAndImm, "; in EmitMatcher()
731 1 + EmitVBRValue(cast<CheckAndImmMatcher>(N)->getValue(), OS); in EmitMatcher()
732 OS << '\n'; in EmitMatcher()
737 OS << "OPC_CheckOrImm, "; in EmitMatcher()
739 1 + EmitVBRValue(cast<CheckOrImmMatcher>(N)->getValue(), OS); in EmitMatcher()
740 OS << '\n'; in EmitMatcher()
745 OS << "OPC_CheckFoldableChainNode,\n"; in EmitMatcher()
749 OS << "OPC_CheckImmAllOnesV,\n"; in EmitMatcher()
753 OS << "OPC_CheckImmAllZerosV,\n"; in EmitMatcher()
766 OS << "OPC_EmitInteger" << MVT(VT).getSizeInBits() << ", "; in EmitMatcher()
770 OS << "OPC_EmitInteger, " << getEnumName(VT) << ", "; in EmitMatcher()
773 unsigned Bytes = OpBytes + EmitSignedVBRValue(Val, OS); in EmitMatcher()
774 OS << '\n'; in EmitMatcher()
785 OS << "OPC_EmitStringInteger" << MVT(VT).getSizeInBits() << ", "; in EmitMatcher()
789 OS << "OPC_EmitStringInteger, " << getEnumName(VT) << ", "; in EmitMatcher()
792 OS << Val << ",\n"; in EmitMatcher()
803 OS << "OPC_EmitRegister2, " << getEnumName(VT) << ", "; in EmitMatcher()
804 OS << "TARGET_VAL(" << getQualifiedName(Reg->TheDef) << "),\n"; in EmitMatcher()
812 OS << "OPC_EmitRegisterI" << MVT(VT).getSizeInBits() << ", "; in EmitMatcher()
816 OS << "OPC_EmitRegister, " << getEnumName(VT) << ", "; in EmitMatcher()
820 OS << getQualifiedName(Reg->TheDef) << ",\n"; in EmitMatcher()
822 OS << "0 "; in EmitMatcher()
824 OS << "/*zero_reg*/"; in EmitMatcher()
825 OS << ",\n"; in EmitMatcher()
833 OS << "OPC_EmitConvertToTarget" << Slot << ",\n"; in EmitMatcher()
836 OS << "OPC_EmitConvertToTarget, " << Slot << ",\n"; in EmitMatcher()
846 OS << "OPC_EmitMergeInputChains1_" << MN->getNode(0) << ",\n"; in EmitMatcher()
850 OS << "OPC_EmitMergeInputChains, " << MN->getNumNodes() << ", "; in EmitMatcher()
852 OS << MN->getNode(i) << ", "; in EmitMatcher()
853 OS << '\n'; in EmitMatcher()
863 OS << "OPC_EmitCopyToRegTwoByte, " << Slot << ", " in EmitMatcher()
868 OS << "OPC_EmitCopyToReg" << Slot << ", " in EmitMatcher()
872 OS << "OPC_EmitCopyToReg, " << Slot << ", " in EmitMatcher()
880 OS << "OPC_EmitNodeXForm, " << getNodeXFormID(XF->getNodeXForm()) << ", " in EmitMatcher()
883 OS << " // " << XF->getNodeXForm()->getName(); in EmitMatcher()
884 OS << '\n'; in EmitMatcher()
894 OS << "OPC_Coverage, "; in EmitMatcher()
903 OS << "TARGET_VAL(" << Offset << "),\n"; in EmitMatcher()
904 OS.indent(FullIndexWidth + Indent); in EmitMatcher()
909 OS << (IsEmitNode ? "OPC_EmitNode" : "OPC_MorphNodeTo"); in EmitMatcher()
913 OS << EN->getNumVTs(); in EmitMatcher()
917 OS << "None"; in EmitMatcher()
921 OS << "Chain"; in EmitMatcher()
926 OS << "GlueInput"; in EmitMatcher()
931 OS << "GlueOutput"; in EmitMatcher()
936 OS << ", TARGET_VAL(" << CGI.Namespace << "::" << CGI.TheDef->getName() in EmitMatcher()
940 OS << ", 0"; in EmitMatcher()
942 OS << "|OPFL_Chain"; in EmitMatcher()
944 OS << "|OPFL_GlueInput"; in EmitMatcher()
946 OS << "|OPFL_GlueOutput"; in EmitMatcher()
948 OS << "|OPFL_MemRefs"; in EmitMatcher()
950 OS << "|OPFL_Variadic" << EN->getNumFixedArityOperands(); in EmitMatcher()
952 OS << ",\n"; in EmitMatcher()
954 OS.indent(FullIndexWidth + Indent + 4); in EmitMatcher()
956 OS << EN->getNumVTs(); in EmitMatcher()
958 OS << "/*#VTs*/"; in EmitMatcher()
959 OS << ", "; in EmitMatcher()
962 OS << getEnumName(EN->getVT(i)) << ", "; in EmitMatcher()
964 OS << EN->getNumOperands(); in EmitMatcher()
966 OS << "/*#Ops*/"; in EmitMatcher()
967 OS << ", "; in EmitMatcher()
970 NumOperandBytes += EmitVBRValue(EN->getOperand(i), OS); in EmitMatcher()
976 OS << " // Results ="; in EmitMatcher()
979 OS << " #" << First + i; in EmitMatcher()
982 OS << '\n'; in EmitMatcher()
985 OS.indent(FullIndexWidth + Indent) in EmitMatcher()
989 OS.indent(FullIndexWidth + Indent) in EmitMatcher()
993 OS << '\n'; in EmitMatcher()
1003 OS << "OPC_Coverage, "; in EmitMatcher()
1012 OS << "TARGET_VAL(" << Offset << "),\n"; in EmitMatcher()
1013 OS.indent(FullIndexWidth + Indent); in EmitMatcher()
1015 OS << "OPC_CompleteMatch, " << CM->getNumResults() << ", "; in EmitMatcher()
1018 NumResultBytes += EmitVBRValue(CM->getResult(i), OS); in EmitMatcher()
1019 OS << '\n'; in EmitMatcher()
1021 OS.indent(FullIndexWidth + Indent) in EmitMatcher()
1025 OS.indent(FullIndexWidth + Indent) in EmitMatcher()
1028 OS << '\n'; in EmitMatcher()
1040 raw_ostream &OS) { in EmitMatcherList() argument
1044 OS << "/*" << format_decimal(CurrentIdx, IndexWidth) << "*/"; in EmitMatcherList()
1045 unsigned MatcherSize = EmitMatcher(N, Indent, CurrentIdx, OS); in EmitMatcherList()
1057 const std::vector<TreePattern *> &Preds, StringRef Decl, raw_ostream &OS) { in EmitNodePredicatesFunction() argument
1061 BeginEmitFunction(OS, "bool", Decl, true /*AddOverride*/); in EmitNodePredicatesFunction()
1062 OS << "{\n"; in EmitNodePredicatesFunction()
1063 OS << " switch (PredNo) {\n"; in EmitNodePredicatesFunction()
1064 OS << " default: llvm_unreachable(\"Invalid predicate in table?\");\n"; in EmitNodePredicatesFunction()
1071 OS << " case " << i << ": {\n"; in EmitNodePredicatesFunction()
1073 OS << " // " << TreePredicateFn(SimilarPred).getFnName() << '\n'; in EmitNodePredicatesFunction()
1074 OS << PredFnCodeStr << "\n }\n"; in EmitNodePredicatesFunction()
1076 OS << " }\n"; in EmitNodePredicatesFunction()
1077 OS << "}\n"; in EmitNodePredicatesFunction()
1078 EndEmitFunction(OS); in EmitNodePredicatesFunction()
1081 void MatcherTableEmitter::EmitPredicateFunctions(raw_ostream &OS) { in EmitPredicateFunctions() argument
1084 BeginEmitFunction(OS, "bool", in EmitPredicateFunctions()
1087 OS << "{\n"; in EmitPredicateFunctions()
1088 OS << " switch (PredNo) {\n"; in EmitPredicateFunctions()
1089 OS << " default: llvm_unreachable(\"Invalid predicate in table?\");\n"; in EmitPredicateFunctions()
1091 OS << " case " << i << ": return " << PatternPredicates[i] << ";\n"; in EmitPredicateFunctions()
1092 OS << " }\n"; in EmitPredicateFunctions()
1093 OS << "}\n"; in EmitPredicateFunctions()
1094 EndEmitFunction(OS); in EmitPredicateFunctions()
1100 OS); in EmitPredicateFunctions()
1105 OS); in EmitPredicateFunctions()
1111 OS, "bool", in EmitPredicateFunctions()
1116 OS << "{\n"; in EmitPredicateFunctions()
1117 OS << " unsigned NextRes = Result.size();\n"; in EmitPredicateFunctions()
1118 OS << " switch (PatternNo) {\n"; in EmitPredicateFunctions()
1119 OS << " default: llvm_unreachable(\"Invalid pattern # in table?\");\n"; in EmitPredicateFunctions()
1127 OS << " case " << i << ":\n"; in EmitPredicateFunctions()
1129 OS << " {\n"; in EmitPredicateFunctions()
1130 OS << " Result.resize(NextRes+" << NumOps << ");\n"; in EmitPredicateFunctions()
1132 OS << " bool Succeeded = " << P.getSelectFunc(); in EmitPredicateFunctions()
1134 OS << " return " << P.getSelectFunc(); in EmitPredicateFunctions()
1136 OS << "("; in EmitPredicateFunctions()
1140 OS << "Root, "; in EmitPredicateFunctions()
1145 OS << "Parent, "; in EmitPredicateFunctions()
1147 OS << "N"; in EmitPredicateFunctions()
1149 OS << ", Result[NextRes+" << i << "].first"; in EmitPredicateFunctions()
1150 OS << ");\n"; in EmitPredicateFunctions()
1152 OS << " if (Succeeded)\n"; in EmitPredicateFunctions()
1153 OS << " dbgs() << \"\\nCOMPLEX_PATTERN: " << P.getSelectFunc() in EmitPredicateFunctions()
1155 OS << " return Succeeded;\n"; in EmitPredicateFunctions()
1156 OS << " }\n"; in EmitPredicateFunctions()
1159 OS << " }\n"; in EmitPredicateFunctions()
1160 OS << "}\n"; in EmitPredicateFunctions()
1161 EndEmitFunction(OS); in EmitPredicateFunctions()
1167 BeginEmitFunction(OS, "SDValue", in EmitPredicateFunctions()
1170 OS << "{\n"; in EmitPredicateFunctions()
1171 OS << " switch (XFormNo) {\n"; in EmitPredicateFunctions()
1172 OS << " default: llvm_unreachable(\"Invalid xform # in table?\");\n"; in EmitPredicateFunctions()
1182 OS << " case " << i << ": { "; in EmitPredicateFunctions()
1184 OS << "// " << NodeXForms[i]->getName(); in EmitPredicateFunctions()
1185 OS << '\n'; in EmitPredicateFunctions()
1190 OS << " SDNode *N = V.getNode();\n"; in EmitPredicateFunctions()
1192 OS << " " << ClassName << " *N = cast<" << ClassName in EmitPredicateFunctions()
1194 OS << Code << "\n }\n"; in EmitPredicateFunctions()
1196 OS << " }\n"; in EmitPredicateFunctions()
1197 OS << "}\n"; in EmitPredicateFunctions()
1198 EndEmitFunction(OS); in EmitPredicateFunctions()
1285 void MatcherTableEmitter::EmitHistogram(const Matcher *M, raw_ostream &OS) { in EmitHistogram() argument
1289 OS << " // Opcode Histogram:\n"; in EmitHistogram()
1291 OS << " // #" in EmitHistogram()
1295 OS << '\n'; in EmitHistogram()
1299 raw_ostream &OS) { in EmitMatcherTable() argument
1300 OS << "#if defined(GET_DAGISEL_DECL) && defined(GET_DAGISEL_BODY)\n"; in EmitMatcherTable()
1301 OS << "#error GET_DAGISEL_DECL and GET_DAGISEL_BODY cannot be both defined, "; in EmitMatcherTable()
1302 OS << "undef both for inline definitions\n"; in EmitMatcherTable()
1303 OS << "#endif\n\n"; in EmitMatcherTable()
1306 OS << "#ifdef GET_DAGISEL_BODY\n"; in EmitMatcherTable()
1307 OS << "#define LOCAL_DAGISEL_STRINGIZE(X) LOCAL_DAGISEL_STRINGIZE_(X)\n"; in EmitMatcherTable()
1308 OS << "#define LOCAL_DAGISEL_STRINGIZE_(X) #X\n"; in EmitMatcherTable()
1309 OS << "static_assert(sizeof(LOCAL_DAGISEL_STRINGIZE(GET_DAGISEL_BODY)) > 1," in EmitMatcherTable()
1311 OS << " \"GET_DAGISEL_BODY is empty: it should be defined with the class " in EmitMatcherTable()
1313 OS << "#undef LOCAL_DAGISEL_STRINGIZE_\n"; in EmitMatcherTable()
1314 OS << "#undef LOCAL_DAGISEL_STRINGIZE\n"; in EmitMatcherTable()
1315 OS << "#endif\n\n"; in EmitMatcherTable()
1317 OS << "#if !defined(GET_DAGISEL_DECL) && !defined(GET_DAGISEL_BODY)\n"; in EmitMatcherTable()
1318 OS << "#define DAGISEL_INLINE 1\n"; in EmitMatcherTable()
1319 OS << "#else\n"; in EmitMatcherTable()
1320 OS << "#define DAGISEL_INLINE 0\n"; in EmitMatcherTable()
1321 OS << "#endif\n\n"; in EmitMatcherTable()
1323 OS << "#if !DAGISEL_INLINE\n"; in EmitMatcherTable()
1324 OS << "#define DAGISEL_CLASS_COLONCOLON GET_DAGISEL_BODY ::\n"; in EmitMatcherTable()
1325 OS << "#else\n"; in EmitMatcherTable()
1326 OS << "#define DAGISEL_CLASS_COLONCOLON\n"; in EmitMatcherTable()
1327 OS << "#endif\n\n"; in EmitMatcherTable()
1329 BeginEmitFunction(OS, "void", "SelectCode(SDNode *N)", false /*AddOverride*/); in EmitMatcherTable()
1343 OS << "{\n"; in EmitMatcherTable()
1344 OS << " // Some target values are emitted as 2 bytes, TARGET_VAL handles\n"; in EmitMatcherTable()
1345 OS << " // this.\n"; in EmitMatcherTable()
1346 OS << " #define TARGET_VAL(X) X & 255, unsigned(X) >> 8\n"; in EmitMatcherTable()
1347 OS << " static const unsigned char MatcherTable[] = {\n"; in EmitMatcherTable()
1348 TotalSize = MatcherEmitter.EmitMatcherList(TheMatcher, 1, 0, OS); in EmitMatcherTable()
1349 OS << " 0\n }; // Total Array size is " << (TotalSize + 1) in EmitMatcherTable()
1352 MatcherEmitter.EmitHistogram(TheMatcher, OS); in EmitMatcherTable()
1354 OS << " #undef TARGET_VAL\n"; in EmitMatcherTable()
1355 OS << " SelectCodeCommon(N, MatcherTable, sizeof(MatcherTable));\n"; in EmitMatcherTable()
1356 OS << "}\n"; in EmitMatcherTable()
1357 EndEmitFunction(OS); in EmitMatcherTable()
1360 MatcherEmitter.EmitPredicateFunctions(OS); in EmitMatcherTable()
1363 MatcherEmitter.EmitPatternMatchTable(OS); in EmitMatcherTable()
1366 OS << "\n"; in EmitMatcherTable()
1367 OS << "#ifdef DAGISEL_INLINE\n"; in EmitMatcherTable()
1368 OS << "#undef DAGISEL_INLINE\n"; in EmitMatcherTable()
1369 OS << "#endif\n"; in EmitMatcherTable()
1370 OS << "#ifdef DAGISEL_CLASS_COLONCOLON\n"; in EmitMatcherTable()
1371 OS << "#undef DAGISEL_CLASS_COLONCOLON\n"; in EmitMatcherTable()
1372 OS << "#endif\n"; in EmitMatcherTable()
1373 OS << "#ifdef GET_DAGISEL_DECL\n"; in EmitMatcherTable()
1374 OS << "#undef GET_DAGISEL_DECL\n"; in EmitMatcherTable()
1375 OS << "#endif\n"; in EmitMatcherTable()
1376 OS << "#ifdef GET_DAGISEL_BODY\n"; in EmitMatcherTable()
1377 OS << "#undef GET_DAGISEL_BODY\n"; in EmitMatcherTable()
1378 OS << "#endif\n"; in EmitMatcherTable()