Lines Matching refs:OS
171 unsigned StartIdx, raw_ostream &OS);
173 unsigned SizeMatcherList(Matcher *N, raw_ostream &OS);
175 void EmitPredicateFunctions(raw_ostream &OS);
177 void EmitHistogram(const Matcher *N, raw_ostream &OS);
179 void EmitPatternMatchTable(raw_ostream &OS);
183 StringRef Decl, raw_ostream &OS);
185 unsigned SizeMatcher(Matcher *N, raw_ostream &OS);
188 raw_ostream &OS);
239 static unsigned EmitVBRValue(uint64_t Val, raw_ostream &OS) { in EmitVBRValue() argument
241 OS << Val << ", "; in EmitVBRValue()
248 OS << (Val&127) << "|128,"; in EmitVBRValue()
252 OS << Val; in EmitVBRValue()
254 OS << "/*" << InVal << "*/"; in EmitVBRValue()
255 OS << ", "; in EmitVBRValue()
262 static unsigned EmitSignedVBRValue(uint64_t Val, raw_ostream &OS) { in EmitSignedVBRValue() argument
268 return EmitVBRValue(Val, OS); in EmitSignedVBRValue()
294 SizeMatcherList(Matcher *N, raw_ostream &OS) { in SizeMatcherList() argument
297 Size += SizeMatcher(N, OS); in SizeMatcherList()
307 SizeMatcher(Matcher *N, raw_ostream &OS) { in SizeMatcher() argument
319 const unsigned ChildSize = SizeMatcherList(SM->getChild(i), OS); in SizeMatcher()
347 const unsigned ChildSize = SizeMatcherList(Child, OS); in SizeMatcher()
358 return EmitMatcher(N, 0, Idx, OS); in SizeMatcher()
363 static void BeginEmitFunction(raw_ostream &OS, StringRef RetType, in BeginEmitFunction() argument
365 OS << "#ifdef GET_DAGISEL_DECL\n"; in BeginEmitFunction()
366 OS << RetType << ' ' << Decl; in BeginEmitFunction()
368 OS << " override"; in BeginEmitFunction()
369 OS << ";\n" in BeginEmitFunction()
372 OS << RetType << " DAGISEL_CLASS_COLONCOLON " << Decl << "\n"; in BeginEmitFunction()
374 OS << "#if DAGISEL_INLINE\n" in BeginEmitFunction()
380 static void EndEmitFunction(raw_ostream &OS) { in EndEmitFunction() argument
381 OS << "#endif // GET_DAGISEL_BODY\n\n"; in EndEmitFunction()
384 void MatcherTableEmitter::EmitPatternMatchTable(raw_ostream &OS) { in EmitPatternMatchTable() argument
391 BeginEmitFunction(OS, "StringRef", "getPatternForIndex(unsigned Index)", in EmitPatternMatchTable()
393 OS << "{\n"; in EmitPatternMatchTable()
394 OS << "static const char *PATTERN_MATCH_TABLE[] = {\n"; in EmitPatternMatchTable()
397 OS << "\"" << It.first << "\",\n"; in EmitPatternMatchTable()
400 OS << "\n};"; in EmitPatternMatchTable()
401 OS << "\nreturn StringRef(PATTERN_MATCH_TABLE[Index]);"; in EmitPatternMatchTable()
402 OS << "\n}\n"; in EmitPatternMatchTable()
403 EndEmitFunction(OS); in EmitPatternMatchTable()
405 BeginEmitFunction(OS, "StringRef", "getIncludePathForIndex(unsigned Index)", in EmitPatternMatchTable()
407 OS << "{\n"; in EmitPatternMatchTable()
408 OS << "static const char *INCLUDE_PATH_TABLE[] = {\n"; in EmitPatternMatchTable()
411 OS << "\"" << It << "\",\n"; in EmitPatternMatchTable()
414 OS << "\n};"; in EmitPatternMatchTable()
415 OS << "\nreturn StringRef(INCLUDE_PATH_TABLE[Index]);"; in EmitPatternMatchTable()
416 OS << "\n}\n"; in EmitPatternMatchTable()
417 EndEmitFunction(OS); in EmitPatternMatchTable()
424 raw_ostream &OS) { in EmitMatcher() argument
425 OS.indent(Indent); in EmitMatcher()
435 OS << "OPC_Scope, "; in EmitMatcher()
439 OS << "/*" << format_decimal(CurrentIdx, IndexWidth) << "*/"; in EmitMatcher()
440 OS.indent(Indent) << "/*Scope*/ "; in EmitMatcher()
442 OS.indent(Indent); in EmitMatcher()
446 unsigned VBRSize = EmitVBRValue(ChildSize, OS); in EmitMatcher()
448 OS << "/*->" << CurrentIdx + VBRSize + ChildSize << "*/"; in EmitMatcher()
450 OS << " // " << SM->getNumChildren() << " children in Scope"; in EmitMatcher()
452 OS << '\n'; in EmitMatcher()
455 CurrentIdx + VBRSize, OS); in EmitMatcher()
463 OS << "/*" << format_decimal(CurrentIdx, IndexWidth) << "*/"; in EmitMatcher()
464 OS.indent(Indent) << "0, "; in EmitMatcher()
466 OS << "/*End of Scope*/"; in EmitMatcher()
467 OS << '\n'; in EmitMatcher()
472 OS << "OPC_RecordNode,"; in EmitMatcher()
474 OS << " // #" in EmitMatcher()
477 OS << '\n'; in EmitMatcher()
481 OS << "OPC_RecordChild" << cast<RecordChildMatcher>(N)->getChildNo() in EmitMatcher()
484 OS << " // #" in EmitMatcher()
487 OS << '\n'; in EmitMatcher()
491 OS << "OPC_RecordMemRef,\n"; in EmitMatcher()
495 OS << "OPC_CaptureGlueInput,\n"; in EmitMatcher()
501 OS << "OPC_MoveChild"; in EmitMatcher()
504 OS << ", "; in EmitMatcher()
505 OS << MCM->getChildNo() << ",\n"; in EmitMatcher()
512 OS << "OPC_MoveSibling"; in EmitMatcher()
515 OS << ", "; in EmitMatcher()
516 OS << MSM->getSiblingNo() << ",\n"; in EmitMatcher()
521 OS << "OPC_MoveParent,\n"; in EmitMatcher()
525 OS << "OPC_CheckSame, " in EmitMatcher()
530 OS << "OPC_CheckChild" in EmitMatcher()
539 OS << "OPC_CheckPatternPredicateTwoByte, TARGET_VAL(" << PredNo << "),"; in EmitMatcher()
541 OS << "OPC_CheckPatternPredicate" << PredNo << ','; in EmitMatcher()
543 OS << "OPC_CheckPatternPredicate, " << PredNo << ','; in EmitMatcher()
545 OS << " // " << Pred; in EmitMatcher()
546 OS << '\n'; in EmitMatcher()
556 OS << "OPC_CheckPredicateWithOperands, " << NumOps << "/*#Ops*/, "; in EmitMatcher()
558 OS << cast<CheckPredicateMatcher>(N)->getOperandNo(i) << ", "; in EmitMatcher()
563 OS << "OPC_CheckPredicate" << PredNo << ", "; in EmitMatcher()
565 OS << "OPC_CheckPredicate, "; in EmitMatcher()
569 OS << PredNo << ','; in EmitMatcher()
571 OS << " // " << Pred.getFnName(); in EmitMatcher()
572 OS << '\n'; in EmitMatcher()
577 OS << "OPC_CheckOpcode, TARGET_VAL(" in EmitMatcher()
587 OS << "OPC_SwitchOpcode "; in EmitMatcher()
590 OS << "OPC_SwitchType "; in EmitMatcher()
595 OS << "/*" << NumCases << " cases */"; in EmitMatcher()
596 OS << ", "; in EmitMatcher()
613 OS << "/*" << format_decimal(CurrentIdx, IndexWidth) << "*/"; in EmitMatcher()
614 OS.indent(Indent); in EmitMatcher()
616 OS << (isa<SwitchOpcodeMatcher>(N) ? in EmitMatcher()
621 CurrentIdx += EmitVBRValue(ChildSize, OS) + IdxSize; in EmitMatcher()
623 OS << "TARGET_VAL(" << SOM->getCaseOpcode(i).getEnumName() << "),"; in EmitMatcher()
625 OS << getEnumName(cast<SwitchTypeMatcher>(N)->getCaseType(i)) << ','; in EmitMatcher()
627 OS << "// ->" << CurrentIdx + ChildSize; in EmitMatcher()
628 OS << '\n'; in EmitMatcher()
630 ChildSize = EmitMatcherList(Child, Indent+1, CurrentIdx, OS); in EmitMatcher()
638 OS << "/*" << format_decimal(CurrentIdx, IndexWidth) << "*/"; in EmitMatcher()
639 OS.indent(Indent) << "0,"; in EmitMatcher()
641 OS << (isa<SwitchOpcodeMatcher>(N) ? in EmitMatcher()
644 OS << '\n'; in EmitMatcher()
654 OS << "OPC_CheckTypeI" << MVT(VT).getSizeInBits() << ",\n"; in EmitMatcher()
657 OS << "OPC_CheckType, " << getEnumName(VT) << ",\n"; in EmitMatcher()
661 OS << "OPC_CheckTypeRes, " << cast<CheckTypeMatcher>(N)->getResNo() << ", " in EmitMatcher()
670 OS << "OPC_CheckChild" << cast<CheckChildTypeMatcher>(N)->getChildNo() in EmitMatcher()
674 OS << "OPC_CheckChild" << cast<CheckChildTypeMatcher>(N)->getChildNo() in EmitMatcher()
681 OS << "OPC_CheckInteger, "; in EmitMatcher()
683 1 + EmitSignedVBRValue(cast<CheckIntegerMatcher>(N)->getValue(), OS); in EmitMatcher()
684 OS << '\n'; in EmitMatcher()
688 OS << "OPC_CheckChild" << cast<CheckChildIntegerMatcher>(N)->getChildNo() in EmitMatcher()
691 cast<CheckChildIntegerMatcher>(N)->getValue(), OS); in EmitMatcher()
692 OS << '\n'; in EmitMatcher()
696 OS << "OPC_CheckCondCode, ISD::" in EmitMatcher()
701 OS << "OPC_CheckChild2CondCode, ISD::" in EmitMatcher()
706 OS << "OPC_CheckValueType, MVT::" in EmitMatcher()
715 OS << "OPC_CheckComplexPat" << PatternNo << ", /*#*/" in EmitMatcher()
718 OS << "OPC_CheckComplexPat, /*CP*/" << PatternNo << ", /*#*/" in EmitMatcher()
722 OS << " // " << Pattern.getSelectFunc(); in EmitMatcher()
723 OS << ":$" << CCPM->getName(); in EmitMatcher()
725 OS << " #" << CCPM->getFirstResult()+i; in EmitMatcher()
728 OS << " + chain result"; in EmitMatcher()
730 OS << '\n'; in EmitMatcher()
735 OS << "OPC_CheckAndImm, "; in EmitMatcher()
736 unsigned Bytes=1+EmitVBRValue(cast<CheckAndImmMatcher>(N)->getValue(), OS); in EmitMatcher()
737 OS << '\n'; in EmitMatcher()
742 OS << "OPC_CheckOrImm, "; in EmitMatcher()
743 unsigned Bytes = 1+EmitVBRValue(cast<CheckOrImmMatcher>(N)->getValue(), OS); in EmitMatcher()
744 OS << '\n'; in EmitMatcher()
749 OS << "OPC_CheckFoldableChainNode,\n"; in EmitMatcher()
753 OS << "OPC_CheckImmAllOnesV,\n"; in EmitMatcher()
757 OS << "OPC_CheckImmAllZerosV,\n"; in EmitMatcher()
770 OS << "OPC_EmitInteger" << MVT(VT).getSizeInBits() << ", "; in EmitMatcher()
774 OS << "OPC_EmitInteger, " << getEnumName(VT) << ", "; in EmitMatcher()
777 unsigned Bytes = OpBytes + EmitSignedVBRValue(Val, OS); in EmitMatcher()
778 OS << '\n'; in EmitMatcher()
789 OS << "OPC_EmitStringInteger" << MVT(VT).getSizeInBits() << ", "; in EmitMatcher()
793 OS << "OPC_EmitStringInteger, " << getEnumName(VT) << ", "; in EmitMatcher()
796 OS << Val << ",\n"; in EmitMatcher()
807 OS << "OPC_EmitRegister2, " << getEnumName(VT) << ", "; in EmitMatcher()
808 OS << "TARGET_VAL(" << getQualifiedName(Reg->TheDef) << "),\n"; in EmitMatcher()
816 OS << "OPC_EmitRegisterI" << MVT(VT).getSizeInBits() << ", "; in EmitMatcher()
820 OS << "OPC_EmitRegister, " << getEnumName(VT) << ", "; in EmitMatcher()
824 OS << getQualifiedName(Reg->TheDef) << ",\n"; in EmitMatcher()
826 OS << "0 "; in EmitMatcher()
828 OS << "/*zero_reg*/"; in EmitMatcher()
829 OS << ",\n"; in EmitMatcher()
837 OS << "OPC_EmitConvertToTarget" << Slot << ",\n"; in EmitMatcher()
840 OS << "OPC_EmitConvertToTarget, " << Slot << ",\n"; in EmitMatcher()
850 OS << "OPC_EmitMergeInputChains1_" << MN->getNode(0) << ",\n"; in EmitMatcher()
854 OS << "OPC_EmitMergeInputChains, " << MN->getNumNodes() << ", "; in EmitMatcher()
856 OS << MN->getNode(i) << ", "; in EmitMatcher()
857 OS << '\n'; in EmitMatcher()
867 OS << "OPC_EmitCopyToRegTwoByte, " << Slot << ", " in EmitMatcher()
872 OS << "OPC_EmitCopyToReg" << Slot << ", " in EmitMatcher()
876 OS << "OPC_EmitCopyToReg, " << Slot << ", " in EmitMatcher()
884 OS << "OPC_EmitNodeXForm, " << getNodeXFormID(XF->getNodeXForm()) << ", " in EmitMatcher()
887 OS << " // "<<XF->getNodeXForm()->getName(); in EmitMatcher()
888 OS <<'\n'; in EmitMatcher()
898 OS << "OPC_Coverage, "; in EmitMatcher()
907 OS << "TARGET_VAL(" << Offset << "),\n"; in EmitMatcher()
908 OS.indent(FullIndexWidth + Indent); in EmitMatcher()
913 OS << (IsEmitNode ? "OPC_EmitNode" : "OPC_MorphNodeTo"); in EmitMatcher()
917 OS << EN->getNumVTs(); in EmitMatcher()
921 OS << "None"; in EmitMatcher()
925 OS << "Chain"; in EmitMatcher()
930 OS << "GlueInput"; in EmitMatcher()
935 OS << "GlueOutput"; in EmitMatcher()
940 OS << ", TARGET_VAL(" << CGI.Namespace << "::" << CGI.TheDef->getName() in EmitMatcher()
944 OS << ", 0"; in EmitMatcher()
946 OS << "|OPFL_Chain"; in EmitMatcher()
948 OS << "|OPFL_GlueInput"; in EmitMatcher()
950 OS << "|OPFL_GlueOutput"; in EmitMatcher()
952 OS << "|OPFL_MemRefs"; in EmitMatcher()
954 OS << "|OPFL_Variadic" << EN->getNumFixedArityOperands(); in EmitMatcher()
956 OS << ",\n"; in EmitMatcher()
958 OS.indent(FullIndexWidth + Indent+4); in EmitMatcher()
960 OS << EN->getNumVTs(); in EmitMatcher()
962 OS << "/*#VTs*/"; in EmitMatcher()
963 OS << ", "; in EmitMatcher()
966 OS << getEnumName(EN->getVT(i)) << ", "; in EmitMatcher()
968 OS << EN->getNumOperands(); in EmitMatcher()
970 OS << "/*#Ops*/"; in EmitMatcher()
971 OS << ", "; in EmitMatcher()
974 NumOperandBytes += EmitVBRValue(EN->getOperand(i), OS); in EmitMatcher()
980 OS << " // Results ="; in EmitMatcher()
983 OS << " #" << First+i; in EmitMatcher()
986 OS << '\n'; in EmitMatcher()
989 OS.indent(FullIndexWidth + Indent) << "// Src: " in EmitMatcher()
992 OS.indent(FullIndexWidth + Indent) << "// Dst: " in EmitMatcher()
996 OS << '\n'; in EmitMatcher()
1006 OS << "OPC_Coverage, "; in EmitMatcher()
1015 OS << "TARGET_VAL(" << Offset << "),\n"; in EmitMatcher()
1016 OS.indent(FullIndexWidth + Indent); in EmitMatcher()
1018 OS << "OPC_CompleteMatch, " << CM->getNumResults() << ", "; in EmitMatcher()
1021 NumResultBytes += EmitVBRValue(CM->getResult(i), OS); in EmitMatcher()
1022 OS << '\n'; in EmitMatcher()
1024 OS.indent(FullIndexWidth + Indent) << " // Src: " in EmitMatcher()
1027 OS.indent(FullIndexWidth + Indent) << " // Dst: " in EmitMatcher()
1030 OS << '\n'; in EmitMatcher()
1041 raw_ostream &OS) { in EmitMatcherList() argument
1045 OS << "/*" << format_decimal(CurrentIdx, IndexWidth) << "*/"; in EmitMatcherList()
1046 unsigned MatcherSize = EmitMatcher(N, Indent, CurrentIdx, OS); in EmitMatcherList()
1058 const std::vector<TreePattern *> &Preds, StringRef Decl, raw_ostream &OS) { in EmitNodePredicatesFunction() argument
1062 BeginEmitFunction(OS, "bool", Decl, true/*AddOverride*/); in EmitNodePredicatesFunction()
1063 OS << "{\n"; in EmitNodePredicatesFunction()
1064 OS << " switch (PredNo) {\n"; in EmitNodePredicatesFunction()
1065 OS << " default: llvm_unreachable(\"Invalid predicate in table?\");\n"; in EmitNodePredicatesFunction()
1072 OS << " case " << i << ": {\n"; in EmitNodePredicatesFunction()
1074 OS << " // " << TreePredicateFn(SimilarPred).getFnName() << '\n'; in EmitNodePredicatesFunction()
1075 OS << PredFnCodeStr << "\n }\n"; in EmitNodePredicatesFunction()
1077 OS << " }\n"; in EmitNodePredicatesFunction()
1078 OS << "}\n"; in EmitNodePredicatesFunction()
1079 EndEmitFunction(OS); in EmitNodePredicatesFunction()
1082 void MatcherTableEmitter::EmitPredicateFunctions(raw_ostream &OS) { in EmitPredicateFunctions() argument
1085 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()
1110 BeginEmitFunction(OS, "bool", in EmitPredicateFunctions()
1115 OS << "{\n"; in EmitPredicateFunctions()
1116 OS << " unsigned NextRes = Result.size();\n"; in EmitPredicateFunctions()
1117 OS << " switch (PatternNo) {\n"; in EmitPredicateFunctions()
1118 OS << " default: llvm_unreachable(\"Invalid pattern # in table?\");\n"; in EmitPredicateFunctions()
1126 OS << " case " << i << ":\n"; in EmitPredicateFunctions()
1128 OS << " {\n"; in EmitPredicateFunctions()
1129 OS << " Result.resize(NextRes+" << NumOps << ");\n"; in EmitPredicateFunctions()
1131 OS << " bool Succeeded = " << P.getSelectFunc(); in EmitPredicateFunctions()
1133 OS << " return " << P.getSelectFunc(); in EmitPredicateFunctions()
1135 OS << "("; in EmitPredicateFunctions()
1139 OS << "Root, "; in EmitPredicateFunctions()
1144 OS << "Parent, "; in EmitPredicateFunctions()
1146 OS << "N"; in EmitPredicateFunctions()
1148 OS << ", Result[NextRes+" << i << "].first"; in EmitPredicateFunctions()
1149 OS << ");\n"; in EmitPredicateFunctions()
1151 OS << " if (Succeeded)\n"; in EmitPredicateFunctions()
1152 OS << " dbgs() << \"\\nCOMPLEX_PATTERN: " << P.getSelectFunc() in EmitPredicateFunctions()
1154 OS << " return Succeeded;\n"; in EmitPredicateFunctions()
1155 OS << " }\n"; in EmitPredicateFunctions()
1158 OS << " }\n"; in EmitPredicateFunctions()
1159 OS << "}\n"; in EmitPredicateFunctions()
1160 EndEmitFunction(OS); in EmitPredicateFunctions()
1167 BeginEmitFunction(OS, "SDValue", in EmitPredicateFunctions()
1169 OS << "{\n"; in EmitPredicateFunctions()
1170 OS << " switch (XFormNo) {\n"; in EmitPredicateFunctions()
1171 OS << " default: llvm_unreachable(\"Invalid xform # in table?\");\n"; in EmitPredicateFunctions()
1181 OS << " case " << i << ": { "; in EmitPredicateFunctions()
1183 OS << "// " << NodeXForms[i]->getName(); in EmitPredicateFunctions()
1184 OS << '\n'; in EmitPredicateFunctions()
1189 OS << " SDNode *N = V.getNode();\n"; in EmitPredicateFunctions()
1191 OS << " " << ClassName << " *N = cast<" << ClassName in EmitPredicateFunctions()
1193 OS << Code << "\n }\n"; in EmitPredicateFunctions()
1195 OS << " }\n"; in EmitPredicateFunctions()
1196 OS << "}\n"; in EmitPredicateFunctions()
1197 EndEmitFunction(OS); in EmitPredicateFunctions()
1285 raw_ostream &OS) { in EmitHistogram() argument
1289 OS << " // Opcode Histogram:\n"; in EmitHistogram()
1291 OS << " // #" in EmitHistogram()
1295 OS << '\n'; in EmitHistogram()
1301 raw_ostream &OS) { in EmitMatcherTable() argument
1302 OS << "#if defined(GET_DAGISEL_DECL) && defined(GET_DAGISEL_BODY)\n"; in EmitMatcherTable()
1303 OS << "#error GET_DAGISEL_DECL and GET_DAGISEL_BODY cannot be both defined, "; in EmitMatcherTable()
1304 OS << "undef both for inline definitions\n"; in EmitMatcherTable()
1305 OS << "#endif\n\n"; in EmitMatcherTable()
1308 OS << "#ifdef GET_DAGISEL_BODY\n"; in EmitMatcherTable()
1309 OS << "#define LOCAL_DAGISEL_STRINGIZE(X) LOCAL_DAGISEL_STRINGIZE_(X)\n"; in EmitMatcherTable()
1310 OS << "#define LOCAL_DAGISEL_STRINGIZE_(X) #X\n"; in EmitMatcherTable()
1311 OS << "static_assert(sizeof(LOCAL_DAGISEL_STRINGIZE(GET_DAGISEL_BODY)) > 1," in EmitMatcherTable()
1313 OS << " \"GET_DAGISEL_BODY is empty: it should be defined with the class " in EmitMatcherTable()
1315 OS << "#undef LOCAL_DAGISEL_STRINGIZE_\n"; in EmitMatcherTable()
1316 OS << "#undef LOCAL_DAGISEL_STRINGIZE\n"; in EmitMatcherTable()
1317 OS << "#endif\n\n"; in EmitMatcherTable()
1319 OS << "#if !defined(GET_DAGISEL_DECL) && !defined(GET_DAGISEL_BODY)\n"; in EmitMatcherTable()
1320 OS << "#define DAGISEL_INLINE 1\n"; in EmitMatcherTable()
1321 OS << "#else\n"; in EmitMatcherTable()
1322 OS << "#define DAGISEL_INLINE 0\n"; in EmitMatcherTable()
1323 OS << "#endif\n\n"; in EmitMatcherTable()
1325 OS << "#if !DAGISEL_INLINE\n"; in EmitMatcherTable()
1326 OS << "#define DAGISEL_CLASS_COLONCOLON GET_DAGISEL_BODY ::\n"; in EmitMatcherTable()
1327 OS << "#else\n"; in EmitMatcherTable()
1328 OS << "#define DAGISEL_CLASS_COLONCOLON\n"; in EmitMatcherTable()
1329 OS << "#endif\n\n"; in EmitMatcherTable()
1331 BeginEmitFunction(OS, "void", "SelectCode(SDNode *N)", false/*AddOverride*/); in EmitMatcherTable()
1345 OS << "{\n"; in EmitMatcherTable()
1346 OS << " // Some target values are emitted as 2 bytes, TARGET_VAL handles\n"; in EmitMatcherTable()
1347 OS << " // this.\n"; in EmitMatcherTable()
1348 OS << " #define TARGET_VAL(X) X & 255, unsigned(X) >> 8\n"; in EmitMatcherTable()
1349 OS << " static const unsigned char MatcherTable[] = {\n"; in EmitMatcherTable()
1350 TotalSize = MatcherEmitter.EmitMatcherList(TheMatcher, 1, 0, OS); in EmitMatcherTable()
1351 OS << " 0\n }; // Total Array size is " << (TotalSize+1) << " bytes\n\n"; in EmitMatcherTable()
1353 MatcherEmitter.EmitHistogram(TheMatcher, OS); in EmitMatcherTable()
1355 OS << " #undef TARGET_VAL\n"; in EmitMatcherTable()
1356 OS << " SelectCodeCommon(N, MatcherTable,sizeof(MatcherTable));\n"; in EmitMatcherTable()
1357 OS << "}\n"; in EmitMatcherTable()
1358 EndEmitFunction(OS); in EmitMatcherTable()
1361 MatcherEmitter.EmitPredicateFunctions(OS); in EmitMatcherTable()
1364 MatcherEmitter.EmitPatternMatchTable(OS); in EmitMatcherTable()
1367 OS << "\n"; in EmitMatcherTable()
1368 OS << "#ifdef DAGISEL_INLINE\n"; in EmitMatcherTable()
1369 OS << "#undef DAGISEL_INLINE\n"; in EmitMatcherTable()
1370 OS << "#endif\n"; in EmitMatcherTable()
1371 OS << "#ifdef DAGISEL_CLASS_COLONCOLON\n"; in EmitMatcherTable()
1372 OS << "#undef DAGISEL_CLASS_COLONCOLON\n"; in EmitMatcherTable()
1373 OS << "#endif\n"; in EmitMatcherTable()
1374 OS << "#ifdef GET_DAGISEL_DECL\n"; in EmitMatcherTable()
1375 OS << "#undef GET_DAGISEL_DECL\n"; in EmitMatcherTable()
1376 OS << "#endif\n"; in EmitMatcherTable()
1377 OS << "#ifdef GET_DAGISEL_BODY\n"; in EmitMatcherTable()
1378 OS << "#undef GET_DAGISEL_BODY\n"; in EmitMatcherTable()
1379 OS << "#endif\n"; in EmitMatcherTable()