Lines Matching defs:Out

299 static void PrintCallingConv(unsigned cc, raw_ostream &Out) {
301 default: Out << "cc" << cc; break;
302 case CallingConv::Fast: Out << "fastcc"; break;
303 case CallingConv::Cold: Out << "coldcc"; break;
304 case CallingConv::AnyReg: Out << "anyregcc"; break;
305 case CallingConv::PreserveMost: Out << "preserve_mostcc"; break;
306 case CallingConv::PreserveAll: Out << "preserve_allcc"; break;
307 case CallingConv::PreserveNone: Out << "preserve_nonecc"; break;
308 case CallingConv::CXX_FAST_TLS: Out << "cxx_fast_tlscc"; break;
309 case CallingConv::GHC: Out << "ghccc"; break;
310 case CallingConv::Tail: Out << "tailcc"; break;
311 case CallingConv::GRAAL: Out << "graalcc"; break;
312 case CallingConv::CFGuard_Check: Out << "cfguard_checkcc"; break;
313 case CallingConv::X86_StdCall: Out << "x86_stdcallcc"; break;
314 case CallingConv::X86_FastCall: Out << "x86_fastcallcc"; break;
315 case CallingConv::X86_ThisCall: Out << "x86_thiscallcc"; break;
316 case CallingConv::X86_RegCall: Out << "x86_regcallcc"; break;
317 case CallingConv::X86_VectorCall:Out << "x86_vectorcallcc"; break;
318 case CallingConv::Intel_OCL_BI: Out << "intel_ocl_bicc"; break;
319 case CallingConv::ARM_APCS: Out << "arm_apcscc"; break;
320 case CallingConv::ARM_AAPCS: Out << "arm_aapcscc"; break;
321 case CallingConv::ARM_AAPCS_VFP: Out << "arm_aapcs_vfpcc"; break;
322 case CallingConv::AArch64_VectorCall: Out << "aarch64_vector_pcs"; break;
324 Out << "aarch64_sve_vector_pcs";
327 Out << "aarch64_sme_preservemost_from_x0";
330 Out << "aarch64_sme_preservemost_from_x1";
333 Out << "aarch64_sme_preservemost_from_x2";
335 case CallingConv::MSP430_INTR: Out << "msp430_intrcc"; break;
336 case CallingConv::AVR_INTR: Out << "avr_intrcc "; break;
337 case CallingConv::AVR_SIGNAL: Out << "avr_signalcc "; break;
338 case CallingConv::PTX_Kernel: Out << "ptx_kernel"; break;
339 case CallingConv::PTX_Device: Out << "ptx_device"; break;
340 case CallingConv::X86_64_SysV: Out << "x86_64_sysvcc"; break;
341 case CallingConv::Win64: Out << "win64cc"; break;
342 case CallingConv::SPIR_FUNC: Out << "spir_func"; break;
343 case CallingConv::SPIR_KERNEL: Out << "spir_kernel"; break;
344 case CallingConv::Swift: Out << "swiftcc"; break;
345 case CallingConv::SwiftTail: Out << "swifttailcc"; break;
346 case CallingConv::X86_INTR: Out << "x86_intrcc"; break;
348 Out << "hhvmcc";
351 Out << "hhvm_ccc";
353 case CallingConv::AMDGPU_VS: Out << "amdgpu_vs"; break;
354 case CallingConv::AMDGPU_LS: Out << "amdgpu_ls"; break;
355 case CallingConv::AMDGPU_HS: Out << "amdgpu_hs"; break;
356 case CallingConv::AMDGPU_ES: Out << "amdgpu_es"; break;
357 case CallingConv::AMDGPU_GS: Out << "amdgpu_gs"; break;
358 case CallingConv::AMDGPU_PS: Out << "amdgpu_ps"; break;
359 case CallingConv::AMDGPU_CS: Out << "amdgpu_cs"; break;
361 Out << "amdgpu_cs_chain";
364 Out << "amdgpu_cs_chain_preserve";
366 case CallingConv::AMDGPU_KERNEL: Out << "amdgpu_kernel"; break;
367 case CallingConv::AMDGPU_Gfx: Out << "amdgpu_gfx"; break;
368 case CallingConv::M68k_RTD: Out << "m68k_rtdcc"; break;
370 Out << "riscv_vector_cc";
445 static void PrintShuffleMask(raw_ostream &Out, Type *Ty, ArrayRef<int> Mask) {
446 Out << ", <";
448 Out << "vscale x ";
449 Out << Mask.size() << " x i32> ";
452 Out << "zeroinitializer";
454 Out << "poison";
456 Out << "<";
461 Out << ", ";
462 Out << "i32 ";
464 Out << "poison";
466 Out << Elt;
468 Out << ">";
1395 static void WriteAsOperandInternal(raw_ostream &Out, const Value *V,
1398 static void WriteAsOperandInternal(raw_ostream &Out, const Metadata *MD,
1402 static void WriteOptimizationInfo(raw_ostream &Out, const User *U) {
1404 Out << FPO->getFastMathFlags();
1409 Out << " nuw";
1411 Out << " nsw";
1415 Out << " exact";
1419 Out << " disjoint";
1422 Out << " inbounds";
1424 Out << " nusw";
1426 Out << " nuw";
1428 Out << " inrange(" << InRange->getLower() << ", " << InRange->getUpper()
1433 Out << " nneg";
1436 Out << " nuw";
1438 Out << " nsw";
1442 static void WriteAPFloatInternal(raw_ostream &Out, const APFloat &APF) {
1468 Out << StrVal;
1496 Out << format_hex(apf.bitcastToAPInt().getZExtValue(), 0, /*Upper=*/true);
1503 Out << "0x";
1506 Out << 'K';
1507 Out << format_hex_no_prefix(API.getHiBits(16).getZExtValue(), 4,
1509 Out << format_hex_no_prefix(API.getLoBits(64).getZExtValue(), 16,
1512 Out << 'L';
1513 Out << format_hex_no_prefix(API.getLoBits(64).getZExtValue(), 16,
1515 Out << format_hex_no_prefix(API.getHiBits(64).getZExtValue(), 16,
1518 Out << 'M';
1519 Out << format_hex_no_prefix(API.getLoBits(64).getZExtValue(), 16,
1521 Out << format_hex_no_prefix(API.getHiBits(64).getZExtValue(), 16,
1524 Out << 'H';
1525 Out << format_hex_no_prefix(API.getZExtValue(), 4,
1528 Out << 'R';
1529 Out << format_hex_no_prefix(API.getZExtValue(), 4,
1535 static void WriteConstantInternal(raw_ostream &Out, const Constant *CV,
1541 Out << "splat (";
1542 WriterCtx.TypePrinter->print(Ty->getScalarType(), Out);
1543 Out << " ";
1547 Out << (CI->getZExtValue() ? "true" : "false");
1549 Out << CI->getValue();
1552 Out << ")";
1561 Out << "splat (";
1562 WriterCtx.TypePrinter->print(Ty->getScalarType(), Out);
1563 Out << " ";
1566 WriteAPFloatInternal(Out, CFP->getValueAPF());
1569 Out << ")";
1575 Out << "zeroinitializer";
1580 Out << "blockaddress(";
1581 WriteAsOperandInternal(Out, BA->getFunction(), WriterCtx);
1582 Out << ", ";
1583 WriteAsOperandInternal(Out, BA->getBasicBlock(), WriterCtx);
1584 Out << ")";
1589 Out << "dso_local_equivalent ";
1590 WriteAsOperandInternal(Out, Equiv->getGlobalValue(), WriterCtx);
1595 Out << "no_cfi ";
1596 WriteAsOperandInternal(Out, NC->getGlobalValue(), WriterCtx);
1601 Out << "ptrauth (";
1612 Out << LS;
1613 WriterCtx.TypePrinter->print(CPA->getOperand(i)->getType(), Out);
1614 Out << ' ';
1615 WriteAsOperandInternal(Out, CPA->getOperand(i), WriterCtx);
1617 Out << ')';
1623 Out << '[';
1624 WriterCtx.TypePrinter->print(ETy, Out);
1625 Out << ' ';
1626 WriteAsOperandInternal(Out, CA->getOperand(0), WriterCtx);
1628 Out << ", ";
1629 WriterCtx.TypePrinter->print(ETy, Out);
1630 Out << ' ';
1631 WriteAsOperandInternal(Out, CA->getOperand(i), WriterCtx);
1633 Out << ']';
1641 Out << "c\"";
1642 printEscapedString(CA->getAsString(), Out);
1643 Out << '"';
1648 Out << '[';
1649 WriterCtx.TypePrinter->print(ETy, Out);
1650 Out << ' ';
1651 WriteAsOperandInternal(Out, CA->getElementAsConstant(0), WriterCtx);
1653 Out << ", ";
1654 WriterCtx.TypePrinter->print(ETy, Out);
1655 Out << ' ';
1656 WriteAsOperandInternal(Out, CA->getElementAsConstant(i), WriterCtx);
1658 Out << ']';
1664 Out << '<';
1665 Out << '{';
1668 Out << ' ';
1669 WriterCtx.TypePrinter->print(CS->getOperand(0)->getType(), Out);
1670 Out << ' ';
1672 WriteAsOperandInternal(Out, CS->getOperand(0), WriterCtx);
1675 Out << ", ";
1676 WriterCtx.TypePrinter->print(CS->getOperand(i)->getType(), Out);
1677 Out << ' ';
1679 WriteAsOperandInternal(Out, CS->getOperand(i), WriterCtx);
1681 Out << ' ';
1684 Out << '}';
1686 Out << '>';
1693 Out << '<';
1694 WriterCtx.TypePrinter->print(ETy, Out);
1695 Out << ' ';
1696 WriteAsOperandInternal(Out, CV->getAggregateElement(0U), WriterCtx);
1698 Out << ", ";
1699 WriterCtx.TypePrinter->print(ETy, Out);
1700 Out << ' ';
1701 WriteAsOperandInternal(Out, CV->getAggregateElement(i), WriterCtx);
1703 Out << '>';
1708 Out << "null";
1713 Out << "none";
1718 Out << "poison";
1723 Out << "undef";
1728 Out << CE->getOpcodeName();
1729 WriteOptimizationInfo(Out, CE);
1730 Out << " (";
1733 WriterCtx.TypePrinter->print(GEP->getSourceElementType(), Out);
1734 Out << ", ";
1739 WriterCtx.TypePrinter->print((*OI)->getType(), Out);
1740 Out << ' ';
1741 WriteAsOperandInternal(Out, *OI, WriterCtx);
1743 Out << ", ";
1747 Out << " to ";
1748 WriterCtx.TypePrinter->print(CE->getType(), Out);
1752 PrintShuffleMask(Out, CE->getType(), CE->getShuffleMask());
1754 Out << ')';
1758 Out << "<placeholder or erroneous Constant>";
1761 static void writeMDTuple(raw_ostream &Out, const MDTuple *Node,
1763 Out << "!{";
1767 Out << "null";
1770 WriterCtx.TypePrinter->print(V->getType(), Out);
1771 Out << ' ';
1772 WriteAsOperandInternal(Out, V, WriterCtx);
1774 WriteAsOperandInternal(Out, MD, WriterCtx);
1778 Out << ", ";
1781 Out << "}";
1802 raw_ostream &Out;
1806 explicit MDFieldPrinter(raw_ostream &Out)
1807 : Out(Out), WriterCtx(AsmWriterContext::getEmpty()) {}
1808 MDFieldPrinter(raw_ostream &Out, AsmWriterContext &Ctx)
1809 : Out(Out), WriterCtx(Ctx) {}
1837 Out << FS << "tag: ";
1840 Out << Tag;
1842 Out << N->getTag();
1846 Out << FS << "type: ";
1849 Out << Type;
1851 Out << N->getMacinfoType();
1856 Out << FS << "checksumkind: " << Checksum.getKindAsString();
1865 Out << FS << Name << ": \"";
1866 printEscapedString(Value, Out);
1867 Out << "\"";
1870 static void writeMetadataAsOperand(raw_ostream &Out, const Metadata *MD,
1873 Out << "null";
1876 WriteAsOperandInternal(Out, MD, WriterCtx);
1885 Out << FS << Name << ": ";
1886 writeMetadataAsOperand(Out, MD, WriterCtx);
1894 Out << FS << Name << ": " << Int;
1902 Out << FS << Name << ": ";
1903 Int.print(Out, !IsUnsigned);
1910 Out << FS << Name << ": " << (Value ? "true" : "false");
1917 Out << FS << Name << ": ";
1926 Out << FlagsFS << StringF;
1929 Out << FlagsFS << Extra;
1936 Out << FS << Name << ": ";
1939 Out << 0;
1950 Out << FlagsFS << StringF;
1953 Out << FlagsFS << Extra;
1958 Out << FS << Name << ": " << DICompileUnit::emissionKindString(EK);
1965 Out << FS << Name << ": " << DICompileUnit::nameTableKindString(NTK);
1974 Out << FS << Name << ": ";
1977 Out << S;
1979 Out << Value;
1982 static void writeGenericDINode(raw_ostream &Out, const GenericDINode *N,
1984 Out << "!GenericDINode(";
1985 MDFieldPrinter Printer(Out, WriterCtx);
1989 Out << Printer.FS << "operands: {";
1992 Out << IFS;
1993 writeMetadataAsOperand(Out, I, WriterCtx);
1995 Out << "}";
1997 Out << ")";
2000 static void writeDILocation(raw_ostream &Out, const DILocation *DL,
2002 Out << "!DILocation(";
2003 MDFieldPrinter Printer(Out, WriterCtx);
2011 Out << ")";
2014 static void writeDIAssignID(raw_ostream &Out, const DIAssignID *DL,
2016 Out << "!DIAssignID()";
2017 MDFieldPrinter Printer(Out, WriterCtx);
2020 static void writeDISubrange(raw_ostream &Out, const DISubrange *N,
2022 Out << "!DISubrange(";
2023 MDFieldPrinter Printer(Out, WriterCtx);
2058 Out << ")";
2061 static void writeDIGenericSubrange(raw_ostream &Out, const DIGenericSubrange *N,
2063 Out << "!DIGenericSubrange(";
2064 MDFieldPrinter Printer(Out, WriterCtx);
2109 Out << ")";
2112 static void writeDIEnumerator(raw_ostream &Out, const DIEnumerator *N,
2114 Out << "!DIEnumerator(";
2115 MDFieldPrinter Printer(Out);
2121 Out << ")";
2124 static void writeDIBasicType(raw_ostream &Out, const DIBasicType *N,
2126 Out << "!DIBasicType(";
2127 MDFieldPrinter Printer(Out);
2136 Out << ")";
2139 static void writeDIStringType(raw_ostream &Out, const DIStringType *N,
2141 Out << "!DIStringType(";
2142 MDFieldPrinter Printer(Out, WriterCtx);
2154 Out << ")";
2157 static void writeDIDerivedType(raw_ostream &Out, const DIDerivedType *N,
2159 Out << "!DIDerivedType(";
2160 MDFieldPrinter Printer(Out, WriterCtx);
2187 Out << ")";
2190 static void writeDICompositeType(raw_ostream &Out, const DICompositeType *N,
2192 Out << "!DICompositeType(";
2193 MDFieldPrinter Printer(Out, WriterCtx);
2220 Out << ")";
2223 static void writeDISubroutineType(raw_ostream &Out, const DISubroutineType *N,
2225 Out << "!DISubroutineType(";
2226 MDFieldPrinter Printer(Out, WriterCtx);
2231 Out << ")";
2234 static void writeDIFile(raw_ostream &Out, const DIFile *N, AsmWriterContext &) {
2235 Out << "!DIFile(";
2236 MDFieldPrinter Printer(Out);
2246 Out << ")";
2249 static void writeDICompileUnit(raw_ostream &Out, const DICompileUnit *N,
2251 Out << "!DICompileUnit(";
2252 MDFieldPrinter Printer(Out, WriterCtx);
2276 Out << ")";
2279 static void writeDISubprogram(raw_ostream &Out, const DISubprogram *N,
2281 Out << "!DISubprogram(";
2282 MDFieldPrinter Printer(Out, WriterCtx);
2304 Out << ")";
2307 static void writeDILexicalBlock(raw_ostream &Out, const DILexicalBlock *N,
2309 Out << "!DILexicalBlock(";
2310 MDFieldPrinter Printer(Out, WriterCtx);
2315 Out << ")";
2318 static void writeDILexicalBlockFile(raw_ostream &Out,
2321 Out << "!DILexicalBlockFile(";
2322 MDFieldPrinter Printer(Out, WriterCtx);
2327 Out << ")";
2330 static void writeDINamespace(raw_ostream &Out, const DINamespace *N,
2332 Out << "!DINamespace(";
2333 MDFieldPrinter Printer(Out, WriterCtx);
2337 Out << ")";
2340 static void writeDICommonBlock(raw_ostream &Out, const DICommonBlock *N,
2342 Out << "!DICommonBlock(";
2343 MDFieldPrinter Printer(Out, WriterCtx);
2349 Out << ")";
2352 static void writeDIMacro(raw_ostream &Out, const DIMacro *N,
2354 Out << "!DIMacro(";
2355 MDFieldPrinter Printer(Out, WriterCtx);
2360 Out << ")";
2363 static void writeDIMacroFile(raw_ostream &Out, const DIMacroFile *N,
2365 Out << "!DIMacroFile(";
2366 MDFieldPrinter Printer(Out, WriterCtx);
2370 Out << ")";
2373 static void writeDIModule(raw_ostream &Out, const DIModule *N,
2375 Out << "!DIModule(";
2376 MDFieldPrinter Printer(Out, WriterCtx);
2385 Out << ")";
2388 static void writeDITemplateTypeParameter(raw_ostream &Out,
2391 Out << "!DITemplateTypeParameter(";
2392 MDFieldPrinter Printer(Out, WriterCtx);
2396 Out << ")";
2399 static void writeDITemplateValueParameter(raw_ostream &Out,
2402 Out << "!DITemplateValueParameter(";
2403 MDFieldPrinter Printer(Out, WriterCtx);
2410 Out << ")";
2413 static void writeDIGlobalVariable(raw_ostream &Out, const DIGlobalVariable *N,
2415 Out << "!DIGlobalVariable(";
2416 MDFieldPrinter Printer(Out, WriterCtx);
2429 Out << ")";
2432 static void writeDILocalVariable(raw_ostream &Out, const DILocalVariable *N,
2434 Out << "!DILocalVariable(";
2435 MDFieldPrinter Printer(Out, WriterCtx);
2445 Out << ")";
2448 static void writeDILabel(raw_ostream &Out, const DILabel *N,
2450 Out << "!DILabel(";
2451 MDFieldPrinter Printer(Out, WriterCtx);
2456 Out << ")";
2459 static void writeDIExpression(raw_ostream &Out, const DIExpression *N,
2461 Out << "!DIExpression(";
2468 Out << FS << OpStr;
2470 Out << FS << Op.getArg(0);
2471 Out << FS << dwarf::AttributeEncodingString(Op.getArg(1));
2474 Out << FS << Op.getArg(A);
2479 Out << FS << I;
2481 Out << ")";
2484 static void writeDIArgList(raw_ostream &Out, const DIArgList *N,
2489 Out << "!DIArgList(";
2491 MDFieldPrinter Printer(Out, WriterCtx);
2493 Out << FS;
2494 WriteAsOperandInternal(Out, Arg, WriterCtx, true);
2496 Out << ")";
2499 static void writeDIGlobalVariableExpression(raw_ostream &Out,
2502 Out << "!DIGlobalVariableExpression(";
2503 MDFieldPrinter Printer(Out, WriterCtx);
2506 Out << ")";
2509 static void writeDIObjCProperty(raw_ostream &Out, const DIObjCProperty *N,
2511 Out << "!DIObjCProperty(";
2512 MDFieldPrinter Printer(Out, WriterCtx);
2520 Out << ")";
2523 static void writeDIImportedEntity(raw_ostream &Out, const DIImportedEntity *N,
2525 Out << "!DIImportedEntity(";
2526 MDFieldPrinter Printer(Out, WriterCtx);
2534 Out << ")";
2537 static void WriteMDNodeBodyInternal(raw_ostream &Out, const MDNode *Node,
2540 Out << "distinct ";
2542 Out << "<temporary!> "; // Handle broken code.
2549 write##CLASS(Out, cast<CLASS>(Node), Ctx); \
2557 static void WriteAsOperandInternal(raw_ostream &Out, const Value *V,
2560 PrintLLVMName(Out, V);
2567 WriteConstantInternal(Out, CV, WriterCtx);
2572 Out << "asm ";
2574 Out << "sideeffect ";
2576 Out << "alignstack ";
2579 Out << "inteldialect ";
2581 Out << "unwind ";
2582 Out << '"';
2583 printEscapedString(IA->getAsmString(), Out);
2584 Out << "\", \"";
2585 printEscapedString(IA->getConstraintString(), Out);
2586 Out << '"';
2591 WriteAsOperandInternal(Out, MD->getMetadata(), WriterCtx,
2631 Out << Prefix << Slot;
2633 Out << "<badref>";
2636 static void WriteAsOperandInternal(raw_ostream &Out, const Metadata *MD,
2642 writeDIExpression(Out, Expr, WriterCtx);
2646 writeDIArgList(Out, ArgList, WriterCtx, FromValue);
2660 writeDILocation(Out, Loc, WriterCtx);
2665 Out << "<" << N << ">";
2667 Out << '!' << Slot;
2672 Out << "!\"";
2673 printEscapedString(MDS->getString(), Out);
2674 Out << '"';
2683 WriterCtx.TypePrinter->print(V->getValue()->getType(), Out);
2684 Out << ' ';
2685 WriteAsOperandInternal(Out, V->getValue(), WriterCtx);
2691 formatted_raw_ostream &Out;
2803 : Out(o), TheModule(M), Machine(Mac), TypePrinter(M), AnnotationWriter(AAW),
2815 : Out(o), TheIndex(Index), Machine(Mac), TypePrinter(/*Module=*/nullptr),
2820 Out << "<null operand!>";
2824 TypePrinter.print(Operand->getType(), Out);
2825 Out << ' ';
2828 WriteAsOperandInternal(Out, Operand, WriterCtx);
2841 Out << " syncscope(\"";
2842 printEscapedString(SSNs[SSID], Out);
2843 Out << "\")";
2856 Out << " " << toIRString(Ordering);
2867 Out << " " << toIRString(SuccessOrdering);
2868 Out << " " << toIRString(FailureOrdering);
2874 Out << "<null operand!>";
2879 TypePrinter.print(Operand->getType(), Out);
2882 Out << ' ';
2885 Out << ' ';
2888 WriteAsOperandInternal(Out, Operand, WriterCtx);
2895 Out << " [ ";
2902 Out << ", ";
2905 Out << '"';
2906 printEscapedString(BU.getTagName(), Out);
2907 Out << '"';
2909 Out << '(';
2915 Out << ", ";
2919 Out << "<null operand bundle!>";
2921 TypePrinter.print(Input->getType(), Out);
2922 Out << " ";
2923 WriteAsOperandInternal(Out, Input, WriterCtx);
2927 Out << ')';
2930 Out << " ]";
2943 Out << "; ModuleID = '" << M->getModuleIdentifier() << "'\n";
2946 Out << "source_filename = \"";
2947 printEscapedString(M->getSourceFileName(), Out);
2948 Out << "\"\n";
2953 Out << "target datalayout = \"" << DL << "\"\n";
2955 Out << "target triple = \"" << M->getTargetTriple() << "\"\n";
2958 Out << '\n';
2968 Out << "module asm \"";
2969 printEscapedString(Front, Out);
2970 Out << "\"\n";
2978 Out << '\n';
2982 Out << '\n';
2986 if (!M->global_empty()) Out << '\n';
2988 printGlobal(&GV); Out << '\n';
2992 if (!M->alias_empty()) Out << "\n";
2997 if (!M->ifunc_empty()) Out << "\n";
3003 Out << '\n';
3012 Out << '\n';
3017 if (!M->named_metadata_empty()) Out << '\n';
3024 Out << '\n';
3033 Out << "\n";
3049 Out << "^" << i++ << " = module: (";
3050 Out << "path: \"";
3051 printEscapedString(ModPair.first, Out);
3052 Out << "\", hash: (";
3055 Out << FS << Hash;
3056 Out << "))\n";
3076 Out << "^" << Machine.getTypeIdSlot(TID.second.first)
3079 Out << ") ; guid = " << TID.first << "\n";
3085 Out << "^" << Machine.getTypeIdCompatibleVtableSlot(TId.first)
3088 Out << ") ; guid = " << GUID << "\n";
3093 Out << "^" << NumSlots << " = flags: " << TheIndex->getFlags() << "\n";
3097 Out << "^" << NumSlots << " = blockcount: " << TheIndex->getBlockCount()
3148 Out << "typeTestRes: (kind: " << getTTResKindName(TTRes.TheKind)
3154 Out << ", alignLog2: " << TTRes.AlignLog2;
3156 Out << ", sizeM1: " << TTRes.SizeM1;
3159 Out << ", bitMask: " << (unsigned)TTRes.BitMask;
3161 Out << ", inlineBits: " << TTRes.InlineBits;
3163 Out << ")";
3167 Out << ", summary: (";
3170 Out << ", wpdResolutions: (";
3173 Out << FS;
3174 Out << "(offset: " << WPDRes.first << ", ";
3176 Out << ")";
3178 Out << ")";
3180 Out << ")";
3185 Out << ", summary: (";
3188 Out << FS;
3189 Out << "(offset: " << P.AddressPointOffset << ", ";
3190 Out << "^" << Machine.getGUIDSlot(P.VTableVI.getGUID());
3191 Out << ")";
3193 Out << ")";
3197 Out << "args: (";
3200 Out << FS;
3201 Out << arg;
3203 Out << ")";
3207 Out << "wpdRes: (kind: ";
3208 Out << getWholeProgDevirtResKindName(WPDRes.TheKind);
3211 Out << ", singleImplName: \"" << WPDRes.SingleImplName << "\"";
3214 Out << ", resByArg: (";
3217 Out << FS;
3219 Out << ", byArg: (kind: ";
3220 Out << getWholeProgDevirtResByArgKindName(ResByArg.second.TheKind);
3225 Out << ", info: " << ResByArg.second.Info;
3230 Out << ", byte: " << ResByArg.second.Byte
3233 Out << ")";
3235 Out << ")";
3237 Out << ")";
3253 Out << ", aliasee: ";
3258 Out << "^" << Machine.getGUIDSlot(SummaryToGUIDMap[&AS->getAliasee()]);
3260 Out << "null";
3265 Out << ", varFlags: (readonly: " << GS->VarFlags.MaybeReadOnly << ", "
3269 Out << ", "
3271 Out << ")";
3274 Out << ", vTableFuncs: (";
3277 Out << FS;
3278 Out << "(virtFunc: ^" << Machine.getGUIDSlot(P.FuncVI.getGUID())
3280 Out << ")";
3282 Out << ")";
3346 Out << ", insts: " << FS->instCount();
3348 Out << ", " << FS->fflags();
3351 Out << ", calls: (";
3354 Out << IFS;
3355 Out << "(callee: ^" << Machine.getGUIDSlot(Call.first.getGUID());
3357 Out << ", hotness: " << getHotnessName(Call.second.getHotness());
3359 Out << ", relbf: " << Call.second.RelBlockFreq;
3363 Out << ", tail: 1";
3364 Out << ")";
3366 Out << ")";
3389 Out << ", allocs: (";
3392 Out << AFS;
3393 Out << "(versions: (";
3396 Out << VFS;
3397 Out << AllocTypeName(V);
3399 Out << "), memProf: (";
3402 Out << MIBFS;
3403 Out << "(type: " << AllocTypeName((uint8_t)MIB.AllocType);
3404 Out << ", stackIds: (";
3407 Out << SIDFS;
3408 Out << TheIndex->getStackIdAtIndex(Id);
3410 Out << "))";
3412 Out << "))";
3414 Out << ")";
3418 Out << ", callsites: (";
3421 Out << SNFS;
3423 Out << "(callee: ^" << Machine.getGUIDSlot(CI.Callee.getGUID());
3425 Out << "(callee: null";
3426 Out << ", clones: (";
3429 Out << VFS;
3430 Out << V;
3432 Out << "), stackIds: (";
3435 Out << SIDFS;
3436 Out << TheIndex->getStackIdAtIndex(Id);
3438 Out << "))";
3440 Out << ")";
3444 Out << "[" << Range.getSignedMin() << ", " << Range.getSignedMax() << "]";
3448 Out << ", params: (";
3451 Out << IFS;
3452 Out << "(param: " << PS.ParamNo;
3453 Out << ", offset: ";
3456 Out << ", calls: (";
3459 Out << IFS;
3460 Out << "(callee: ^" << Machine.getGUIDSlot(Call.Callee.getGUID());
3461 Out << ", param: " << Call.ParamNo;
3462 Out << ", offset: ";
3464 Out << ")";
3466 Out << ")";
3468 Out << ")";
3470 Out << ")";
3476 Out << ", typeIdInfo: (";
3479 Out << TIDFS;
3480 Out << "typeTests: (";
3485 Out << FS;
3486 Out << GUID;
3491 Out << FS;
3494 Out << "^" << Slot;
3497 Out << ")";
3500 Out << TIDFS;
3504 Out << TIDFS;
3508 Out << TIDFS;
3513 Out << TIDFS;
3517 Out << ")";
3523 Out << "vFuncId: (";
3524 Out << "guid: " << VFId.GUID;
3525 Out << ", offset: " << VFId.Offset;
3526 Out << ")";
3532 Out << FS;
3533 Out << "vFuncId: (";
3536 Out << "^" << Slot;
3537 Out << ", offset: " << VFId.Offset;
3538 Out << ")";
3544 Out << Tag << ": (";
3547 Out << FS;
3550 Out << ")";
3556 Out << Tag << ": (";
3559 Out << FS;
3560 Out << "(";
3563 Out << ", ";
3566 Out << ")";
3568 Out << ")";
3574 Out << getSummaryKindName(Summary.getSummaryKind()) << ": ";
3575 Out << "(module: ^" << Machine.getModulePathSlot(Summary.modulePath())
3577 Out << "linkage: " << getLinkageName(LT);
3578 Out << ", visibility: "
3580 Out << ", notEligibleToImport: " << GVFlags.NotEligibleToImport;
3581 Out << ", live: " << GVFlags.Live;
3582 Out << ", dsoLocal: " << GVFlags.DSOLocal;
3583 Out << ", canAutoHide: " << GVFlags.CanAutoHide;
3584 Out << ", importType: "
3586 Out << ")";
3597 Out << ", refs: (";
3600 Out << FS;
3602 Out << "readonly ";
3604 Out << "writeonly ";
3605 Out << "^" << Machine.getGUIDSlot(Ref.getGUID());
3607 Out << ")";
3610 Out << ")";
3614 Out << "^" << Slot << " = gv: (";
3616 Out << "name: \"" << VI.name() << "\"";
3618 Out << "guid: " << VI.getGUID();
3620 Out << ", summaries: (";
3623 Out << FS;
3626 Out << ")";
3628 Out << ")";
3630 Out << " ; guid = " << VI.getGUID();
3631 Out << "\n";
3635 formatted_raw_ostream &Out) {
3637 Out << "<empty name> ";
3642 Out << FirstC;
3644 Out << '\\' << hexdigit(FirstC >> 4) << hexdigit(FirstC & 0x0F);
3648 Out << C;
3650 Out << '\\' << hexdigit(C >> 4) << hexdigit(C & 0x0F);
3656 Out << '!';
3657 printMetadataIdentifier(NMD->getName(), Out);
3658 Out << " = !{";
3661 Out << ", ";
3667 writeDIExpression(Out, Expr, AsmWriterContext::getEmpty());
3673 Out << "<badref>";
3675 Out << '!' << Slot;
3677 Out << "}\n";
3681 formatted_raw_ostream &Out) {
3684 case GlobalValue::HiddenVisibility: Out << "hidden "; break;
3685 case GlobalValue::ProtectedVisibility: Out << "protected "; break;
3690 formatted_raw_ostream &Out) {
3692 Out << "dso_local ";
3696 formatted_raw_ostream &Out) {
3699 case GlobalValue::DLLImportStorageClass: Out << "dllimport "; break;
3700 case GlobalValue::DLLExportStorageClass: Out << "dllexport "; break;
3705 formatted_raw_ostream &Out) {
3710 Out << "thread_local ";
3713 Out << "thread_local(localdynamic) ";
3716 Out << "thread_local(initialexec) ";
3719 Out << "thread_local(localexec) ";
3736 static void maybePrintComdat(formatted_raw_ostream &Out,
3743 Out << ',';
3744 Out << " comdat";
3749 Out << '(';
3750 PrintLLVMName(Out, C->getName(), ComdatPrefix);
3751 Out << ')';
3756 Out << "; Materializable\n";
3759 WriteAsOperandInternal(Out, GV, WriterCtx);
3760 Out << " = ";
3763 Out << "external ";
3765 Out << getLinkageNameWithSpace(GV->getLinkage());
3766 PrintDSOLocation(*GV, Out);
3767 PrintVisibility(GV->getVisibility(), Out);
3768 PrintDLLStorageClass(GV->getDLLStorageClass(), Out);
3769 PrintThreadLocalModel(GV->getThreadLocalMode(), Out);
3772 Out << UA << ' ';
3775 Out << "addrspace(" << AddressSpace << ") ";
3776 if (GV->isExternallyInitialized()) Out << "externally_initialized ";
3777 Out << (GV->isConstant() ? "constant " : "global ");
3778 TypePrinter.print(GV->getValueType(), Out);
3781 Out << ' ';
3786 Out << ", section \"";
3787 printEscapedString(GV->getSection(), Out);
3788 Out << '"';
3791 Out << ", partition \"";
3792 printEscapedString(GV->getPartition(), Out);
3793 Out << '"';
3796 Out << ", code_model \"";
3799 Out << "tiny";
3802 Out << "small";
3805 Out << "kernel";
3808 Out << "medium";
3811 Out << "large";
3814 Out << '"';
3821 Out << ", no_sanitize_address";
3823 Out << ", no_sanitize_hwaddress";
3825 Out << ", sanitize_memtag";
3827 Out << ", sanitize_address_dyninit";
3830 maybePrintComdat(Out, *GV);
3832 Out << ", align " << A->value();
3840 Out << " #" << Machine.getAttributeGroupSlot(Attrs);
3847 Out << "; Materializable\n";
3850 WriteAsOperandInternal(Out, GA, WriterCtx);
3851 Out << " = ";
3853 Out << getLinkageNameWithSpace(GA->getLinkage());
3854 PrintDSOLocation(*GA, Out);
3855 PrintVisibility(GA->getVisibility(), Out);
3856 PrintDLLStorageClass(GA->getDLLStorageClass(), Out);
3857 PrintThreadLocalModel(GA->getThreadLocalMode(), Out);
3860 Out << UA << ' ';
3862 Out << "alias ";
3864 TypePrinter.print(GA->getValueType(), Out);
3865 Out << ", ";
3870 TypePrinter.print(GA->getType(), Out);
3871 Out << " <<NULL ALIASEE>>";
3875 Out << ", partition \"";
3876 printEscapedString(GA->getPartition(), Out);
3877 Out << '"';
3881 Out << '\n';
3886 Out << "; Materializable\n";
3889 WriteAsOperandInternal(Out, GI, WriterCtx);
3890 Out << " = ";
3892 Out << getLinkageNameWithSpace(GI->getLinkage());
3893 PrintDSOLocation(*GI, Out);
3894 PrintVisibility(GI->getVisibility(), Out);
3896 Out << "ifunc ";
3898 TypePrinter.print(GI->getValueType(), Out);
3899 Out << ", ";
3904 TypePrinter.print(GI->getType(), Out);
3905 Out << " <<NULL RESOLVER>>";
3909 Out << ", partition \"";
3910 printEscapedString(GI->getPartition(), Out);
3911 Out << '"';
3915 Out << '\n';
3919 C->print(Out);
3926 Out << '\n';
3931 Out << '%' << I << " = type ";
3935 TypePrinter.printStructBody(NumberedTypes[I], Out);
3936 Out << '\n';
3941 PrintLLVMName(Out, NamedType->getName(), LocalPrefix);
3942 Out << " = type ";
3946 TypePrinter.printStructBody(NamedType, Out);
3947 Out << '\n';
3953 if (AnnotationWriter) AnnotationWriter->emitFunctionAnnot(F, Out);
3956 Out << "; Materializable\n";
3971 Out << "; Function Attrs: " << AttrStr << '\n';
3977 Out << "declare";
3981 Out << ' ';
3983 Out << "define ";
3985 Out << getLinkageNameWithSpace(F->getLinkage());
3986 PrintDSOLocation(*F, Out);
3987 PrintVisibility(F->getVisibility(), Out);
3988 PrintDLLStorageClass(F->getDLLStorageClass(), Out);
3992 PrintCallingConv(F->getCallingConv(), Out);
3993 Out << " ";
3998 Out << Attrs.getAsString(AttributeList::ReturnIndex) << ' ';
3999 TypePrinter.print(F->getReturnType(), Out);
4001 Out << ' ';
4002 WriteAsOperandInternal(Out, F, WriterCtx);
4003 Out << '(';
4011 Out << ", ";
4013 TypePrinter.print(FT->getParamType(I), Out);
4017 Out << ' ';
4026 Out << ", ";
4033 if (FT->getNumParams()) Out << ", ";
4034 Out << "..."; // Output varargs portion of signature!
4036 Out << ')';
4039 Out << ' ' << UA;
4046 Out << " addrspace(" << F->getAddressSpace() << ")";
4048 Out << " #" << Machine.getAttributeGroupSlot(Attrs.getFnAttrs());
4050 Out << " section \"";
4051 printEscapedString(F->getSection(), Out);
4052 Out << '"';
4055 Out << " partition \"";
4056 printEscapedString(F->getPartition(), Out);
4057 Out << '"';
4059 maybePrintComdat(Out, *F);
4061 Out << " align " << A->value();
4063 Out << " gc \"" << F->getGC() << '"';
4065 Out << " prefix ";
4069 Out << " prologue ";
4073 Out << " personality ";
4078 Out << '\n';
4084 Out << " {";
4092 Out << "}\n";
4102 TypePrinter.print(Arg->getType(), Out);
4106 Out << ' ';
4112 Out << ' ';
4113 PrintLLVMName(Out, Arg);
4117 Out << " %" << Slot;
4125 Out << "\n";
4126 PrintLLVMName(Out, BB->getName(), LabelPrefix);
4127 Out << ':';
4129 Out << "\n";
4132 Out << Slot << ":";
4134 Out << "<badref>:";
4139 Out.PadToColumn(50);
4140 Out << ";";
4144 Out << " No predecessors!";
4146 Out << " preds = ";
4149 Out << ", ";
4155 Out << "\n";
4157 if (AnnotationWriter) AnnotationWriter->emitBasicBlockStartAnnot(BB, Out);
4166 if (AnnotationWriter) AnnotationWriter->emitBasicBlockEndAnnot(BB, Out);
4172 Out << '\n';
4178 Out << " ; (";
4180 Out << ", ";
4182 Out << ")";
4192 AnnotationWriter->printInfoComment(V, Out);
4197 raw_ostream &Out) {
4200 Out << " <cannot get addrspace!>";
4214 Out << " addrspace(" << CallAddrSpace << ")";
4219 if (AnnotationWriter) AnnotationWriter->emitInstructionAnnot(&I, Out);
4222 Out << " ";
4226 PrintLLVMName(Out, &I);
4227 Out << " = ";
4232 Out << "<badref> = ";
4234 Out << '%' << SlotNum << " = ";
4239 Out << "musttail ";
4241 Out << "tail ";
4243 Out << "notail ";
4247 Out << I.getOpcodeName();
4252 Out << " atomic";
4255 Out << " weak";
4262 Out << " volatile";
4265 WriteOptimizationInfo(Out, &I);
4269 Out << ' ' << CI->getPredicate();
4273 Out << ' ' << AtomicRMWInst::getOperationName(RMWI->getOperation());
4281 Out << ' ';
4283 Out << ", ";
4285 Out << ", ";
4291 Out << ' ';
4293 Out << ", ";
4295 Out << " [";
4297 Out << "\n ";
4299 Out << ", ";
4302 Out << "\n ]";
4305 Out << ' ';
4307 Out << ", [";
4311 Out << ", ";
4314 Out << ']';
4316 Out << ' ';
4317 TypePrinter.print(I.getType(), Out);
4318 Out << ' ';
4321 if (op) Out << ", ";
4322 Out << "[ ";
4323 writeOperand(PN->getIncomingValue(op), false); Out << ", ";
4324 writeOperand(PN->getIncomingBlock(op), false); Out << " ]";
4327 Out << ' ';
4330 Out << ", " << i;
4332 Out << ' ';
4333 writeOperand(I.getOperand(0), true); Out << ", ";
4336 Out << ", " << i;
4338 Out << ' ';
4339 TypePrinter.print(I.getType(), Out);
4341 Out << '\n';
4344 Out << " cleanup";
4347 if (i != 0 || LPI->isCleanup()) Out << "\n";
4349 Out << " catch ";
4351 Out << " filter ";
4356 Out << " within ";
4358 Out << " [";
4362 Out << ", ";
4366 Out << "] unwind ";
4370 Out << "to caller";
4372 Out << " within ";
4374 Out << " [";
4377 Out << ", ";
4380 Out << ']';
4382 Out << " void";
4384 Out << " from ";
4387 Out << " to ";
4390 Out << " from ";
4393 Out << " unwind ";
4397 Out << "to caller";
4401 Out << " ";
4402 PrintCallingConv(CI->getCallingConv(), Out);
4411 Out << ' ' << PAL.getAsString(AttributeList::ReturnIndex);
4414 maybePrintCallAddrSpace(Operand, &I, Out);
4419 Out << ' ';
4420 TypePrinter.print(FTy->isVarArg() ? FTy : RetTy, Out);
4421 Out << ' ';
4423 Out << '(';
4426 Out << ", ";
4436 Out << ", ";
4437 Out << "...";
4440 Out << ')';
4442 Out << " #" << Machine.getAttributeGroupSlot(PAL.getFnAttrs());
4453 Out << " ";
4454 PrintCallingConv(II->getCallingConv(), Out);
4458 Out << ' ' << PAL.getAsString(AttributeList::ReturnIndex);
4461 maybePrintCallAddrSpace(Operand, &I, Out);
4467 Out << ' ';
4468 TypePrinter.print(FTy->isVarArg() ? FTy : RetTy, Out);
4469 Out << ' ';
4471 Out << '(';
4474 Out << ", ";
4478 Out << ')';
4480 Out << " #" << Machine.getAttributeGroupSlot(PAL.getFnAttrs());
4484 Out << "\n to ";
4486 Out << " unwind ";
4496 Out << " ";
4497 PrintCallingConv(CBI->getCallingConv(), Out);
4501 Out << ' ' << PAL.getAsString(AttributeList::ReturnIndex);
4507 Out << ' ';
4508 TypePrinter.print(FTy->isVarArg() ? FTy : RetTy, Out);
4509 Out << ' ';
4511 Out << '(';
4514 Out << ", ";
4518 Out << ')';
4520 Out << " #" << Machine.getAttributeGroupSlot(PAL.getFnAttrs());
4524 Out << "\n to ";
4526 Out << " [";
4529 Out << ", ";
4532 Out << ']';
4534 Out << ' ';
4536 Out << "inalloca ";
4538 Out << "swifterror ";
4539 TypePrinter.print(AI->getAllocatedType(), Out);
4547 Out << ", ";
4551 Out << ", align " << A->value();
4556 Out << ", addrspace(" << AddrSpace << ')';
4560 Out << ' ';
4563 Out << " to ";
4564 TypePrinter.print(I.getType(), Out);
4567 Out << ' ';
4570 Out << ", ";
4571 TypePrinter.print(I.getType(), Out);
4574 Out << ' ';
4575 TypePrinter.print(GEP->getSourceElementType(), Out);
4576 Out << ',';
4578 Out << ' ';
4579 TypePrinter.print(LI->getType(), Out);
4580 Out << ',';
4608 Out << ' ';
4609 TypePrinter.print(TheType, Out);
4612 Out << ' ';
4614 if (i) Out << ", ";
4624 Out << ", align " << A->value();
4629 Out << ", align " << A->value();
4633 Out << ", align " << CXI->getAlign().value();
4637 Out << ", align " << RMWI->getAlign().value();
4641 PrintShuffleMask(Out, SVI->getType(), SVI->getShuffleMask());
4658 Out << "\n";
4661 Out << " DbgMarker -> { ";
4663 Out << " }";
4678 Out << "#dbg_";
4681 Out << "value";
4684 Out << "declare";
4687 Out << "assign";
4693 Out << "(";
4694 WriteAsOperandInternal(Out, DVR.getRawLocation(), WriterCtx, true);
4695 Out << ", ";
4696 WriteAsOperandInternal(Out, DVR.getRawVariable(), WriterCtx, true);
4697 Out << ", ";
4698 WriteAsOperandInternal(Out, DVR.getRawExpression(), WriterCtx, true);
4699 Out << ", ";
4701 WriteAsOperandInternal(Out, DVR.getRawAssignID(), WriterCtx, true);
4702 Out << ", ";
4703 WriteAsOperandInternal(Out, DVR.getRawAddress(), WriterCtx, true);
4704 Out << ", ";
4705 WriteAsOperandInternal(Out, DVR.getRawAddressExpression(), WriterCtx, true);
4706 Out << ", ";
4708 WriteAsOperandInternal(Out, DVR.getDebugLoc().getAsMDNode(), WriterCtx, true);
4709 Out << ")";
4716 Out << " ";
4718 Out << '\n';
4723 Out << "#dbg_label(";
4724 WriteAsOperandInternal(Out, Label.getRawLabel(), WriterCtx, true);
4725 Out << ", ";
4726 WriteAsOperandInternal(Out, Label.getDebugLoc(), WriterCtx, true);
4727 Out << ")";
4742 Out << Separator;
4744 Out << "!";
4745 printMetadataIdentifier(MDNames[Kind], Out);
4747 Out << "!<unknown kind #" << Kind << ">";
4748 Out << ' ';
4749 WriteAsOperandInternal(Out, I.second, WriterCtx);
4754 Out << '!' << Slot << " = ";
4756 Out << "\n";
4772 WriteMDNodeBodyInternal(Out, Node, WriterCtx);
4777 Out << Attr.getAsString(InAttrGroup);
4781 Out << Attribute::getNameFromAttrKind(Attr.getKindAsEnum());
4783 Out << '(';
4784 TypePrinter.print(Ty, Out);
4785 Out << ')';
4794 Out << ' ';
4808 Out << "attributes #" << I.second << " = { "
4816 Out << " ";
4818 Out << "uselistorder";
4820 Out << "_bb ";
4822 Out << ", ";
4825 Out << " ";
4828 Out << ", { ";
4831 Out << Shuffle[0];
4833 Out << ", " << Shuffle[I];
4834 Out << " }\n";
4842 Out << "\n; uselistorder directives\n";