Lines Matching refs:Out

298 static void PrintCallingConv(unsigned cc, raw_ostream &Out) {
300 default: Out << "cc" << cc; break;
301 case CallingConv::Fast: Out << "fastcc"; break;
302 case CallingConv::Cold: Out << "coldcc"; break;
303 case CallingConv::AnyReg: Out << "anyregcc"; break;
304 case CallingConv::PreserveMost: Out << "preserve_mostcc"; break;
305 case CallingConv::PreserveAll: Out << "preserve_allcc"; break;
306 case CallingConv::PreserveNone: Out << "preserve_nonecc"; break;
307 case CallingConv::CXX_FAST_TLS: Out << "cxx_fast_tlscc"; break;
308 case CallingConv::GHC: Out << "ghccc"; break;
309 case CallingConv::Tail: Out << "tailcc"; break;
310 case CallingConv::GRAAL: Out << "graalcc"; break;
311 case CallingConv::CFGuard_Check: Out << "cfguard_checkcc"; break;
312 case CallingConv::X86_StdCall: Out << "x86_stdcallcc"; break;
313 case CallingConv::X86_FastCall: Out << "x86_fastcallcc"; break;
314 case CallingConv::X86_ThisCall: Out << "x86_thiscallcc"; break;
315 case CallingConv::X86_RegCall: Out << "x86_regcallcc"; break;
316 case CallingConv::X86_VectorCall:Out << "x86_vectorcallcc"; break;
317 case CallingConv::Intel_OCL_BI: Out << "intel_ocl_bicc"; break;
318 case CallingConv::ARM_APCS: Out << "arm_apcscc"; break;
319 case CallingConv::ARM_AAPCS: Out << "arm_aapcscc"; break;
320 case CallingConv::ARM_AAPCS_VFP: Out << "arm_aapcs_vfpcc"; break;
321 case CallingConv::AArch64_VectorCall: Out << "aarch64_vector_pcs"; break;
323 Out << "aarch64_sve_vector_pcs";
326 Out << "aarch64_sme_preservemost_from_x0";
329 Out << "aarch64_sme_preservemost_from_x1";
332 Out << "aarch64_sme_preservemost_from_x2";
334 case CallingConv::MSP430_INTR: Out << "msp430_intrcc"; break;
335 case CallingConv::AVR_INTR: Out << "avr_intrcc "; break;
336 case CallingConv::AVR_SIGNAL: Out << "avr_signalcc "; break;
337 case CallingConv::PTX_Kernel: Out << "ptx_kernel"; break;
338 case CallingConv::PTX_Device: Out << "ptx_device"; break;
339 case CallingConv::X86_64_SysV: Out << "x86_64_sysvcc"; break;
340 case CallingConv::Win64: Out << "win64cc"; break;
341 case CallingConv::SPIR_FUNC: Out << "spir_func"; break;
342 case CallingConv::SPIR_KERNEL: Out << "spir_kernel"; break;
343 case CallingConv::Swift: Out << "swiftcc"; break;
344 case CallingConv::SwiftTail: Out << "swifttailcc"; break;
345 case CallingConv::X86_INTR: Out << "x86_intrcc"; break;
347 Out << "hhvmcc";
350 Out << "hhvm_ccc";
352 case CallingConv::AMDGPU_VS: Out << "amdgpu_vs"; break;
353 case CallingConv::AMDGPU_LS: Out << "amdgpu_ls"; break;
354 case CallingConv::AMDGPU_HS: Out << "amdgpu_hs"; break;
355 case CallingConv::AMDGPU_ES: Out << "amdgpu_es"; break;
356 case CallingConv::AMDGPU_GS: Out << "amdgpu_gs"; break;
357 case CallingConv::AMDGPU_PS: Out << "amdgpu_ps"; break;
358 case CallingConv::AMDGPU_CS: Out << "amdgpu_cs"; break;
360 Out << "amdgpu_cs_chain";
363 Out << "amdgpu_cs_chain_preserve";
365 case CallingConv::AMDGPU_KERNEL: Out << "amdgpu_kernel"; break;
366 case CallingConv::AMDGPU_Gfx: Out << "amdgpu_gfx"; break;
367 case CallingConv::M68k_RTD: Out << "m68k_rtdcc"; break;
369 Out << "riscv_vector_cc";
444 static void PrintShuffleMask(raw_ostream &Out, Type *Ty, ArrayRef<int> Mask) {
445 Out << ", <";
447 Out << "vscale x ";
448 Out << Mask.size() << " x i32> ";
451 Out << "zeroinitializer";
453 Out << "poison";
455 Out << "<";
460 Out << ", ";
461 Out << "i32 ";
463 Out << "poison";
465 Out << Elt;
467 Out << ">";
1393 static void WriteAsOperandInternal(raw_ostream &Out, const Value *V,
1396 static void WriteAsOperandInternal(raw_ostream &Out, const Metadata *MD,
1400 static void WriteOptimizationInfo(raw_ostream &Out, const User *U) {
1402 Out << FPO->getFastMathFlags();
1407 Out << " nuw";
1409 Out << " nsw";
1413 Out << " exact";
1417 Out << " disjoint";
1420 Out << " inbounds";
1422 Out << " nusw";
1424 Out << " nuw";
1426 Out << " inrange(" << InRange->getLower() << ", " << InRange->getUpper()
1431 Out << " nneg";
1434 Out << " nuw";
1436 Out << " nsw";
1439 Out << " samesign";
1443 static void WriteAPFloatInternal(raw_ostream &Out, const APFloat &APF) {
1469 Out << StrVal;
1497 Out << format_hex(apf.bitcastToAPInt().getZExtValue(), 0, /*Upper=*/true);
1504 Out << "0x";
1507 Out << 'K';
1508 Out << format_hex_no_prefix(API.getHiBits(16).getZExtValue(), 4,
1510 Out << format_hex_no_prefix(API.getLoBits(64).getZExtValue(), 16,
1513 Out << 'L';
1514 Out << format_hex_no_prefix(API.getLoBits(64).getZExtValue(), 16,
1516 Out << format_hex_no_prefix(API.getHiBits(64).getZExtValue(), 16,
1519 Out << 'M';
1520 Out << format_hex_no_prefix(API.getLoBits(64).getZExtValue(), 16,
1522 Out << format_hex_no_prefix(API.getHiBits(64).getZExtValue(), 16,
1525 Out << 'H';
1526 Out << format_hex_no_prefix(API.getZExtValue(), 4,
1529 Out << 'R';
1530 Out << format_hex_no_prefix(API.getZExtValue(), 4,
1536 static void WriteConstantInternal(raw_ostream &Out, const Constant *CV,
1542 Out << "splat (";
1543 WriterCtx.TypePrinter->print(Ty->getScalarType(), Out);
1544 Out << " ";
1548 Out << (CI->getZExtValue() ? "true" : "false");
1550 Out << CI->getValue();
1553 Out << ")";
1562 Out << "splat (";
1563 WriterCtx.TypePrinter->print(Ty->getScalarType(), Out);
1564 Out << " ";
1567 WriteAPFloatInternal(Out, CFP->getValueAPF());
1570 Out << ")";
1576 Out << "zeroinitializer";
1581 Out << "blockaddress(";
1582 WriteAsOperandInternal(Out, BA->getFunction(), WriterCtx);
1583 Out << ", ";
1584 WriteAsOperandInternal(Out, BA->getBasicBlock(), WriterCtx);
1585 Out << ")";
1590 Out << "dso_local_equivalent ";
1591 WriteAsOperandInternal(Out, Equiv->getGlobalValue(), WriterCtx);
1596 Out << "no_cfi ";
1597 WriteAsOperandInternal(Out, NC->getGlobalValue(), WriterCtx);
1602 Out << "ptrauth (";
1613 Out << LS;
1614 WriterCtx.TypePrinter->print(CPA->getOperand(i)->getType(), Out);
1615 Out << ' ';
1616 WriteAsOperandInternal(Out, CPA->getOperand(i), WriterCtx);
1618 Out << ')';
1624 Out << '[';
1625 WriterCtx.TypePrinter->print(ETy, Out);
1626 Out << ' ';
1627 WriteAsOperandInternal(Out, CA->getOperand(0), WriterCtx);
1629 Out << ", ";
1630 WriterCtx.TypePrinter->print(ETy, Out);
1631 Out << ' ';
1632 WriteAsOperandInternal(Out, CA->getOperand(i), WriterCtx);
1634 Out << ']';
1642 Out << "c\"";
1643 printEscapedString(CA->getAsString(), Out);
1644 Out << '"';
1649 Out << '[';
1650 WriterCtx.TypePrinter->print(ETy, Out);
1651 Out << ' ';
1652 WriteAsOperandInternal(Out, CA->getElementAsConstant(0), WriterCtx);
1654 Out << ", ";
1655 WriterCtx.TypePrinter->print(ETy, Out);
1656 Out << ' ';
1657 WriteAsOperandInternal(Out, CA->getElementAsConstant(i), WriterCtx);
1659 Out << ']';
1665 Out << '<';
1666 Out << '{';
1669 Out << ' ';
1670 WriterCtx.TypePrinter->print(CS->getOperand(0)->getType(), Out);
1671 Out << ' ';
1673 WriteAsOperandInternal(Out, CS->getOperand(0), WriterCtx);
1676 Out << ", ";
1677 WriterCtx.TypePrinter->print(CS->getOperand(i)->getType(), Out);
1678 Out << ' ';
1680 WriteAsOperandInternal(Out, CS->getOperand(i), WriterCtx);
1682 Out << ' ';
1685 Out << '}';
1687 Out << '>';
1702 Out << "splat (";
1703 WriterCtx.TypePrinter->print(ETy, Out);
1704 Out << ' ';
1705 WriteAsOperandInternal(Out, SplatVal, WriterCtx);
1706 Out << ')';
1711 Out << '<';
1712 WriterCtx.TypePrinter->print(ETy, Out);
1713 Out << ' ';
1714 WriteAsOperandInternal(Out, CV->getAggregateElement(0U), WriterCtx);
1716 Out << ", ";
1717 WriterCtx.TypePrinter->print(ETy, Out);
1718 Out << ' ';
1719 WriteAsOperandInternal(Out, CV->getAggregateElement(i), WriterCtx);
1721 Out << '>';
1726 Out << "null";
1731 Out << "none";
1736 Out << "poison";
1741 Out << "undef";
1754 Out << "splat (";
1755 WriterCtx.TypePrinter->print(SplatVal->getType(), Out);
1756 Out << ' ';
1757 WriteAsOperandInternal(Out, SplatVal, WriterCtx);
1758 Out << ')';
1764 Out << CE->getOpcodeName();
1765 WriteOptimizationInfo(Out, CE);
1766 Out << " (";
1769 WriterCtx.TypePrinter->print(GEP->getSourceElementType(), Out);
1770 Out << ", ";
1775 WriterCtx.TypePrinter->print((*OI)->getType(), Out);
1776 Out << ' ';
1777 WriteAsOperandInternal(Out, *OI, WriterCtx);
1779 Out << ", ";
1783 Out << " to ";
1784 WriterCtx.TypePrinter->print(CE->getType(), Out);
1788 PrintShuffleMask(Out, CE->getType(), CE->getShuffleMask());
1790 Out << ')';
1794 Out << "<placeholder or erroneous Constant>";
1797 static void writeMDTuple(raw_ostream &Out, const MDTuple *Node,
1799 Out << "!{";
1803 Out << "null";
1806 WriterCtx.TypePrinter->print(V->getType(), Out);
1807 Out << ' ';
1808 WriteAsOperandInternal(Out, V, WriterCtx);
1810 WriteAsOperandInternal(Out, MD, WriterCtx);
1814 Out << ", ";
1817 Out << "}";
1838 raw_ostream &Out;
1842 explicit MDFieldPrinter(raw_ostream &Out)
1843 : Out(Out), WriterCtx(AsmWriterContext::getEmpty()) {}
1844 MDFieldPrinter(raw_ostream &Out, AsmWriterContext &Ctx)
1845 : Out(Out), WriterCtx(Ctx) {}
1873 Out << FS << "tag: ";
1876 Out << Tag;
1878 Out << N->getTag();
1882 Out << FS << "type: ";
1885 Out << Type;
1887 Out << N->getMacinfoType();
1892 Out << FS << "checksumkind: " << Checksum.getKindAsString();
1901 Out << FS << Name << ": \"";
1902 printEscapedString(Value, Out);
1903 Out << "\"";
1906 static void writeMetadataAsOperand(raw_ostream &Out, const Metadata *MD,
1909 Out << "null";
1912 WriteAsOperandInternal(Out, MD, WriterCtx);
1921 Out << FS << Name << ": ";
1922 writeMetadataAsOperand(Out, MD, WriterCtx);
1930 Out << FS << Name << ": " << Int;
1938 Out << FS << Name << ": ";
1939 Int.print(Out, !IsUnsigned);
1946 Out << FS << Name << ": " << (Value ? "true" : "false");
1953 Out << FS << Name << ": ";
1962 Out << FlagsFS << StringF;
1965 Out << FlagsFS << Extra;
1972 Out << FS << Name << ": ";
1975 Out << 0;
1986 Out << FlagsFS << StringF;
1989 Out << FlagsFS << Extra;
1994 Out << FS << Name << ": " << DICompileUnit::emissionKindString(EK);
2001 Out << FS << Name << ": " << DICompileUnit::nameTableKindString(NTK);
2010 Out << FS << Name << ": ";
2013 Out << S;
2015 Out << Value;
2018 static void writeGenericDINode(raw_ostream &Out, const GenericDINode *N,
2020 Out << "!GenericDINode(";
2021 MDFieldPrinter Printer(Out, WriterCtx);
2025 Out << Printer.FS << "operands: {";
2028 Out << IFS;
2029 writeMetadataAsOperand(Out, I, WriterCtx);
2031 Out << "}";
2033 Out << ")";
2036 static void writeDILocation(raw_ostream &Out, const DILocation *DL,
2038 Out << "!DILocation(";
2039 MDFieldPrinter Printer(Out, WriterCtx);
2047 Out << ")";
2050 static void writeDIAssignID(raw_ostream &Out, const DIAssignID *DL,
2052 Out << "!DIAssignID()";
2053 MDFieldPrinter Printer(Out, WriterCtx);
2056 static void writeDISubrange(raw_ostream &Out, const DISubrange *N,
2058 Out << "!DISubrange(";
2059 MDFieldPrinter Printer(Out, WriterCtx);
2094 Out << ")";
2097 static void writeDIGenericSubrange(raw_ostream &Out, const DIGenericSubrange *N,
2099 Out << "!DIGenericSubrange(";
2100 MDFieldPrinter Printer(Out, WriterCtx);
2145 Out << ")";
2148 static void writeDIEnumerator(raw_ostream &Out, const DIEnumerator *N,
2150 Out << "!DIEnumerator(";
2151 MDFieldPrinter Printer(Out);
2157 Out << ")";
2160 static void writeDIBasicType(raw_ostream &Out, const DIBasicType *N,
2162 Out << "!DIBasicType(";
2163 MDFieldPrinter Printer(Out);
2173 Out << ")";
2176 static void writeDIStringType(raw_ostream &Out, const DIStringType *N,
2178 Out << "!DIStringType(";
2179 MDFieldPrinter Printer(Out, WriterCtx);
2191 Out << ")";
2194 static void writeDIDerivedType(raw_ostream &Out, const DIDerivedType *N,
2196 Out << "!DIDerivedType(";
2197 MDFieldPrinter Printer(Out, WriterCtx);
2224 Out << ")";
2227 static void writeDICompositeType(raw_ostream &Out, const DICompositeType *N,
2229 Out << "!DICompositeType(";
2230 MDFieldPrinter Printer(Out, WriterCtx);
2260 Out << ")";
2263 static void writeDISubroutineType(raw_ostream &Out, const DISubroutineType *N,
2265 Out << "!DISubroutineType(";
2266 MDFieldPrinter Printer(Out, WriterCtx);
2271 Out << ")";
2274 static void writeDIFile(raw_ostream &Out, const DIFile *N, AsmWriterContext &) {
2275 Out << "!DIFile(";
2276 MDFieldPrinter Printer(Out);
2286 Out << ")";
2289 static void writeDICompileUnit(raw_ostream &Out, const DICompileUnit *N,
2291 Out << "!DICompileUnit(";
2292 MDFieldPrinter Printer(Out, WriterCtx);
2316 Out << ")";
2319 static void writeDISubprogram(raw_ostream &Out, const DISubprogram *N,
2321 Out << "!DISubprogram(";
2322 MDFieldPrinter Printer(Out, WriterCtx);
2344 Out << ")";
2347 static void writeDILexicalBlock(raw_ostream &Out, const DILexicalBlock *N,
2349 Out << "!DILexicalBlock(";
2350 MDFieldPrinter Printer(Out, WriterCtx);
2355 Out << ")";
2358 static void writeDILexicalBlockFile(raw_ostream &Out,
2361 Out << "!DILexicalBlockFile(";
2362 MDFieldPrinter Printer(Out, WriterCtx);
2367 Out << ")";
2370 static void writeDINamespace(raw_ostream &Out, const DINamespace *N,
2372 Out << "!DINamespace(";
2373 MDFieldPrinter Printer(Out, WriterCtx);
2377 Out << ")";
2380 static void writeDICommonBlock(raw_ostream &Out, const DICommonBlock *N,
2382 Out << "!DICommonBlock(";
2383 MDFieldPrinter Printer(Out, WriterCtx);
2389 Out << ")";
2392 static void writeDIMacro(raw_ostream &Out, const DIMacro *N,
2394 Out << "!DIMacro(";
2395 MDFieldPrinter Printer(Out, WriterCtx);
2400 Out << ")";
2403 static void writeDIMacroFile(raw_ostream &Out, const DIMacroFile *N,
2405 Out << "!DIMacroFile(";
2406 MDFieldPrinter Printer(Out, WriterCtx);
2410 Out << ")";
2413 static void writeDIModule(raw_ostream &Out, const DIModule *N,
2415 Out << "!DIModule(";
2416 MDFieldPrinter Printer(Out, WriterCtx);
2425 Out << ")";
2428 static void writeDITemplateTypeParameter(raw_ostream &Out,
2431 Out << "!DITemplateTypeParameter(";
2432 MDFieldPrinter Printer(Out, WriterCtx);
2436 Out << ")";
2439 static void writeDITemplateValueParameter(raw_ostream &Out,
2442 Out << "!DITemplateValueParameter(";
2443 MDFieldPrinter Printer(Out, WriterCtx);
2450 Out << ")";
2453 static void writeDIGlobalVariable(raw_ostream &Out, const DIGlobalVariable *N,
2455 Out << "!DIGlobalVariable(";
2456 MDFieldPrinter Printer(Out, WriterCtx);
2469 Out << ")";
2472 static void writeDILocalVariable(raw_ostream &Out, const DILocalVariable *N,
2474 Out << "!DILocalVariable(";
2475 MDFieldPrinter Printer(Out, WriterCtx);
2485 Out << ")";
2488 static void writeDILabel(raw_ostream &Out, const DILabel *N,
2490 Out << "!DILabel(";
2491 MDFieldPrinter Printer(Out, WriterCtx);
2496 Out << ")";
2499 static void writeDIExpression(raw_ostream &Out, const DIExpression *N,
2501 Out << "!DIExpression(";
2508 Out << FS << OpStr;
2510 Out << FS << Op.getArg(0);
2511 Out << FS << dwarf::AttributeEncodingString(Op.getArg(1));
2514 Out << FS << Op.getArg(A);
2519 Out << FS << I;
2521 Out << ")";
2524 static void writeDIArgList(raw_ostream &Out, const DIArgList *N,
2529 Out << "!DIArgList(";
2531 MDFieldPrinter Printer(Out, WriterCtx);
2533 Out << FS;
2534 WriteAsOperandInternal(Out, Arg, WriterCtx, true);
2536 Out << ")";
2539 static void writeDIGlobalVariableExpression(raw_ostream &Out,
2542 Out << "!DIGlobalVariableExpression(";
2543 MDFieldPrinter Printer(Out, WriterCtx);
2546 Out << ")";
2549 static void writeDIObjCProperty(raw_ostream &Out, const DIObjCProperty *N,
2551 Out << "!DIObjCProperty(";
2552 MDFieldPrinter Printer(Out, WriterCtx);
2560 Out << ")";
2563 static void writeDIImportedEntity(raw_ostream &Out, const DIImportedEntity *N,
2565 Out << "!DIImportedEntity(";
2566 MDFieldPrinter Printer(Out, WriterCtx);
2574 Out << ")";
2577 static void WriteMDNodeBodyInternal(raw_ostream &Out, const MDNode *Node,
2580 Out << "distinct ";
2582 Out << "<temporary!> "; // Handle broken code.
2589 write##CLASS(Out, cast<CLASS>(Node), Ctx); \
2597 static void WriteAsOperandInternal(raw_ostream &Out, const Value *V,
2600 PrintLLVMName(Out, V);
2607 WriteConstantInternal(Out, CV, WriterCtx);
2612 Out << "asm ";
2614 Out << "sideeffect ";
2616 Out << "alignstack ";
2619 Out << "inteldialect ";
2621 Out << "unwind ";
2622 Out << '"';
2623 printEscapedString(IA->getAsmString(), Out);
2624 Out << "\", \"";
2625 printEscapedString(IA->getConstraintString(), Out);
2626 Out << '"';
2631 WriteAsOperandInternal(Out, MD->getMetadata(), WriterCtx,
2671 Out << Prefix << Slot;
2673 Out << "<badref>";
2676 static void WriteAsOperandInternal(raw_ostream &Out, const Metadata *MD,
2682 writeDIExpression(Out, Expr, WriterCtx);
2686 writeDIArgList(Out, ArgList, WriterCtx, FromValue);
2700 writeDILocation(Out, Loc, WriterCtx);
2705 Out << "<" << N << ">";
2707 Out << '!' << Slot;
2712 Out << "!\"";
2713 printEscapedString(MDS->getString(), Out);
2714 Out << '"';
2723 WriterCtx.TypePrinter->print(V->getValue()->getType(), Out);
2724 Out << ' ';
2725 WriteAsOperandInternal(Out, V->getValue(), WriterCtx);
2731 formatted_raw_ostream &Out;
2843 : Out(o), TheModule(M), Machine(Mac), TypePrinter(M), AnnotationWriter(AAW),
2855 : Out(o), TheIndex(Index), Machine(Mac), TypePrinter(/*Module=*/nullptr),
2860 Out << "<null operand!>";
2864 TypePrinter.print(Operand->getType(), Out);
2865 Out << ' ';
2868 WriteAsOperandInternal(Out, Operand, WriterCtx);
2881 Out << " syncscope(\"";
2882 printEscapedString(SSNs[SSID], Out);
2883 Out << "\")";
2896 Out << " " << toIRString(Ordering);
2907 Out << " " << toIRString(SuccessOrdering);
2908 Out << " " << toIRString(FailureOrdering);
2914 Out << "<null operand!>";
2919 TypePrinter.print(Operand->getType(), Out);
2922 Out << ' ';
2925 Out << ' ';
2928 WriteAsOperandInternal(Out, Operand, WriterCtx);
2935 Out << " [ ";
2942 Out << ", ";
2945 Out << '"';
2946 printEscapedString(BU.getTagName(), Out);
2947 Out << '"';
2949 Out << '(';
2955 Out << ", ";
2959 Out << "<null operand bundle!>";
2961 TypePrinter.print(Input->getType(), Out);
2962 Out << " ";
2963 WriteAsOperandInternal(Out, Input, WriterCtx);
2967 Out << ')';
2970 Out << " ]";
2983 Out << "; ModuleID = '" << M->getModuleIdentifier() << "'\n";
2986 Out << "source_filename = \"";
2987 printEscapedString(M->getSourceFileName(), Out);
2988 Out << "\"\n";
2993 Out << "target datalayout = \"" << DL << "\"\n";
2995 Out << "target triple = \"" << M->getTargetTriple() << "\"\n";
2998 Out << '\n';
3008 Out << "module asm \"";
3009 printEscapedString(Front, Out);
3010 Out << "\"\n";
3018 Out << '\n';
3022 Out << '\n';
3026 if (!M->global_empty()) Out << '\n';
3028 printGlobal(&GV); Out << '\n';
3032 if (!M->alias_empty()) Out << "\n";
3037 if (!M->ifunc_empty()) Out << "\n";
3043 Out << '\n';
3052 Out << '\n';
3057 if (!M->named_metadata_empty()) Out << '\n';
3064 Out << '\n';
3073 Out << "\n";
3089 Out << "^" << i++ << " = module: (";
3090 Out << "path: \"";
3091 printEscapedString(ModPair.first, Out);
3092 Out << "\", hash: (";
3095 Out << FS << Hash;
3096 Out << "))\n";
3116 Out << "^" << Machine.getTypeIdSlot(TID.second.first)
3119 Out << ") ; guid = " << TID.first << "\n";
3125 Out << "^" << Machine.getTypeIdCompatibleVtableSlot(TId.first)
3128 Out << ") ; guid = " << GUID << "\n";
3133 Out << "^" << NumSlots << " = flags: " << TheIndex->getFlags() << "\n";
3137 Out << "^" << NumSlots << " = blockcount: " << TheIndex->getBlockCount()
3188 Out << "typeTestRes: (kind: " << getTTResKindName(TTRes.TheKind)
3194 Out << ", alignLog2: " << TTRes.AlignLog2;
3196 Out << ", sizeM1: " << TTRes.SizeM1;
3199 Out << ", bitMask: " << (unsigned)TTRes.BitMask;
3201 Out << ", inlineBits: " << TTRes.InlineBits;
3203 Out << ")";
3207 Out << ", summary: (";
3210 Out << ", wpdResolutions: (";
3213 Out << FS;
3214 Out << "(offset: " << WPDRes.first << ", ";
3216 Out << ")";
3218 Out << ")";
3220 Out << ")";
3225 Out << ", summary: (";
3228 Out << FS;
3229 Out << "(offset: " << P.AddressPointOffset << ", ";
3230 Out << "^" << Machine.getGUIDSlot(P.VTableVI.getGUID());
3231 Out << ")";
3233 Out << ")";
3237 Out << "args: (";
3240 Out << FS;
3241 Out << arg;
3243 Out << ")";
3247 Out << "wpdRes: (kind: ";
3248 Out << getWholeProgDevirtResKindName(WPDRes.TheKind);
3251 Out << ", singleImplName: \"" << WPDRes.SingleImplName << "\"";
3254 Out << ", resByArg: (";
3257 Out << FS;
3259 Out << ", byArg: (kind: ";
3260 Out << getWholeProgDevirtResByArgKindName(ResByArg.second.TheKind);
3265 Out << ", info: " << ResByArg.second.Info;
3270 Out << ", byte: " << ResByArg.second.Byte
3273 Out << ")";
3275 Out << ")";
3277 Out << ")";
3293 Out << ", aliasee: ";
3298 Out << "^" << Machine.getGUIDSlot(SummaryToGUIDMap[&AS->getAliasee()]);
3300 Out << "null";
3305 Out << ", varFlags: (readonly: " << GS->VarFlags.MaybeReadOnly << ", "
3309 Out << ", "
3311 Out << ")";
3314 Out << ", vTableFuncs: (";
3317 Out << FS;
3318 Out << "(virtFunc: ^" << Machine.getGUIDSlot(P.FuncVI.getGUID())
3320 Out << ")";
3322 Out << ")";
3386 Out << ", insts: " << FS->instCount();
3388 Out << ", " << FS->fflags();
3391 Out << ", calls: (";
3394 Out << IFS;
3395 Out << "(callee: ^" << Machine.getGUIDSlot(Call.first.getGUID());
3397 Out << ", hotness: " << getHotnessName(Call.second.getHotness());
3399 Out << ", relbf: " << Call.second.RelBlockFreq;
3403 Out << ", tail: 1";
3404 Out << ")";
3406 Out << ")";
3429 Out << ", allocs: (";
3432 Out << AFS;
3433 Out << "(versions: (";
3436 Out << VFS;
3437 Out << AllocTypeName(V);
3439 Out << "), memProf: (";
3442 Out << MIBFS;
3443 Out << "(type: " << AllocTypeName((uint8_t)MIB.AllocType);
3444 Out << ", stackIds: (";
3447 Out << SIDFS;
3448 Out << TheIndex->getStackIdAtIndex(Id);
3450 Out << "))";
3452 Out << "))";
3454 Out << ")";
3458 Out << ", callsites: (";
3461 Out << SNFS;
3463 Out << "(callee: ^" << Machine.getGUIDSlot(CI.Callee.getGUID());
3465 Out << "(callee: null";
3466 Out << ", clones: (";
3469 Out << VFS;
3470 Out << V;
3472 Out << "), stackIds: (";
3475 Out << SIDFS;
3476 Out << TheIndex->getStackIdAtIndex(Id);
3478 Out << "))";
3480 Out << ")";
3484 Out << "[" << Range.getSignedMin() << ", " << Range.getSignedMax() << "]";
3488 Out << ", params: (";
3491 Out << IFS;
3492 Out << "(param: " << PS.ParamNo;
3493 Out << ", offset: ";
3496 Out << ", calls: (";
3499 Out << IFS;
3500 Out << "(callee: ^" << Machine.getGUIDSlot(Call.Callee.getGUID());
3501 Out << ", param: " << Call.ParamNo;
3502 Out << ", offset: ";
3504 Out << ")";
3506 Out << ")";
3508 Out << ")";
3510 Out << ")";
3516 Out << ", typeIdInfo: (";
3519 Out << TIDFS;
3520 Out << "typeTests: (";
3525 Out << FS;
3526 Out << GUID;
3531 Out << FS;
3534 Out << "^" << Slot;
3537 Out << ")";
3540 Out << TIDFS;
3544 Out << TIDFS;
3548 Out << TIDFS;
3553 Out << TIDFS;
3557 Out << ")";
3563 Out << "vFuncId: (";
3564 Out << "guid: " << VFId.GUID;
3565 Out << ", offset: " << VFId.Offset;
3566 Out << ")";
3572 Out << FS;
3573 Out << "vFuncId: (";
3576 Out << "^" << Slot;
3577 Out << ", offset: " << VFId.Offset;
3578 Out << ")";
3584 Out << Tag << ": (";
3587 Out << FS;
3590 Out << ")";
3596 Out << Tag << ": (";
3599 Out << FS;
3600 Out << "(";
3603 Out << ", ";
3606 Out << ")";
3608 Out << ")";
3614 Out << getSummaryKindName(Summary.getSummaryKind()) << ": ";
3615 Out << "(module: ^" << Machine.getModulePathSlot(Summary.modulePath())
3617 Out << "linkage: " << getLinkageName(LT);
3618 Out << ", visibility: "
3620 Out << ", notEligibleToImport: " << GVFlags.NotEligibleToImport;
3621 Out << ", live: " << GVFlags.Live;
3622 Out << ", dsoLocal: " << GVFlags.DSOLocal;
3623 Out << ", canAutoHide: " << GVFlags.CanAutoHide;
3624 Out << ", importType: "
3626 Out << ")";
3637 Out << ", refs: (";
3640 Out << FS;
3642 Out << "readonly ";
3644 Out << "writeonly ";
3645 Out << "^" << Machine.getGUIDSlot(Ref.getGUID());
3647 Out << ")";
3650 Out << ")";
3654 Out << "^" << Slot << " = gv: (";
3656 Out << "name: \"" << VI.name() << "\"";
3658 Out << "guid: " << VI.getGUID();
3660 Out << ", summaries: (";
3663 Out << FS;
3666 Out << ")";
3668 Out << ")";
3670 Out << " ; guid = " << VI.getGUID();
3671 Out << "\n";
3675 formatted_raw_ostream &Out) {
3677 Out << "<empty name> ";
3682 Out << FirstC;
3684 Out << '\\' << hexdigit(FirstC >> 4) << hexdigit(FirstC & 0x0F);
3688 Out << C;
3690 Out << '\\' << hexdigit(C >> 4) << hexdigit(C & 0x0F);
3696 Out << '!';
3697 printMetadataIdentifier(NMD->getName(), Out);
3698 Out << " = !{";
3701 Out << ", ";
3707 writeDIExpression(Out, Expr, AsmWriterContext::getEmpty());
3713 Out << "<badref>";
3715 Out << '!' << Slot;
3717 Out << "}\n";
3721 formatted_raw_ostream &Out) {
3724 case GlobalValue::HiddenVisibility: Out << "hidden "; break;
3725 case GlobalValue::ProtectedVisibility: Out << "protected "; break;
3730 formatted_raw_ostream &Out) {
3732 Out << "dso_local ";
3736 formatted_raw_ostream &Out) {
3739 case GlobalValue::DLLImportStorageClass: Out << "dllimport "; break;
3740 case GlobalValue::DLLExportStorageClass: Out << "dllexport "; break;
3745 formatted_raw_ostream &Out) {
3750 Out << "thread_local ";
3753 Out << "thread_local(localdynamic) ";
3756 Out << "thread_local(initialexec) ";
3759 Out << "thread_local(localexec) ";
3776 static void maybePrintComdat(formatted_raw_ostream &Out,
3783 Out << ',';
3784 Out << " comdat";
3789 Out << '(';
3790 PrintLLVMName(Out, C->getName(), ComdatPrefix);
3791 Out << ')';
3796 Out << "; Materializable\n";
3799 WriteAsOperandInternal(Out, GV, WriterCtx);
3800 Out << " = ";
3803 Out << "external ";
3805 Out << getLinkageNameWithSpace(GV->getLinkage());
3806 PrintDSOLocation(*GV, Out);
3807 PrintVisibility(GV->getVisibility(), Out);
3808 PrintDLLStorageClass(GV->getDLLStorageClass(), Out);
3809 PrintThreadLocalModel(GV->getThreadLocalMode(), Out);
3812 Out << UA << ' ';
3815 Out << "addrspace(" << AddressSpace << ") ";
3816 if (GV->isExternallyInitialized()) Out << "externally_initialized ";
3817 Out << (GV->isConstant() ? "constant " : "global ");
3818 TypePrinter.print(GV->getValueType(), Out);
3821 Out << ' ';
3826 Out << ", section \"";
3827 printEscapedString(GV->getSection(), Out);
3828 Out << '"';
3831 Out << ", partition \"";
3832 printEscapedString(GV->getPartition(), Out);
3833 Out << '"';
3836 Out << ", code_model \"";
3839 Out << "tiny";
3842 Out << "small";
3845 Out << "kernel";
3848 Out << "medium";
3851 Out << "large";
3854 Out << '"';
3861 Out << ", no_sanitize_address";
3863 Out << ", no_sanitize_hwaddress";
3865 Out << ", sanitize_memtag";
3867 Out << ", sanitize_address_dyninit";
3870 maybePrintComdat(Out, *GV);
3872 Out << ", align " << A->value();
3880 Out << " #" << Machine.getAttributeGroupSlot(Attrs);
3887 Out << "; Materializable\n";
3890 WriteAsOperandInternal(Out, GA, WriterCtx);
3891 Out << " = ";
3893 Out << getLinkageNameWithSpace(GA->getLinkage());
3894 PrintDSOLocation(*GA, Out);
3895 PrintVisibility(GA->getVisibility(), Out);
3896 PrintDLLStorageClass(GA->getDLLStorageClass(), Out);
3897 PrintThreadLocalModel(GA->getThreadLocalMode(), Out);
3900 Out << UA << ' ';
3902 Out << "alias ";
3904 TypePrinter.print(GA->getValueType(), Out);
3905 Out << ", ";
3910 TypePrinter.print(GA->getType(), Out);
3911 Out << " <<NULL ALIASEE>>";
3915 Out << ", partition \"";
3916 printEscapedString(GA->getPartition(), Out);
3917 Out << '"';
3921 Out << '\n';
3926 Out << "; Materializable\n";
3929 WriteAsOperandInternal(Out, GI, WriterCtx);
3930 Out << " = ";
3932 Out << getLinkageNameWithSpace(GI->getLinkage());
3933 PrintDSOLocation(*GI, Out);
3934 PrintVisibility(GI->getVisibility(), Out);
3936 Out << "ifunc ";
3938 TypePrinter.print(GI->getValueType(), Out);
3939 Out << ", ";
3944 TypePrinter.print(GI->getType(), Out);
3945 Out << " <<NULL RESOLVER>>";
3949 Out << ", partition \"";
3950 printEscapedString(GI->getPartition(), Out);
3951 Out << '"';
3955 Out << '\n';
3959 C->print(Out);
3966 Out << '\n';
3971 Out << '%' << I << " = type ";
3975 TypePrinter.printStructBody(NumberedTypes[I], Out);
3976 Out << '\n';
3981 PrintLLVMName(Out, NamedType->getName(), LocalPrefix);
3982 Out << " = type ";
3986 TypePrinter.printStructBody(NamedType, Out);
3987 Out << '\n';
3993 if (AnnotationWriter) AnnotationWriter->emitFunctionAnnot(F, Out);
3996 Out << "; Materializable\n";
4011 Out << "; Function Attrs: " << AttrStr << '\n';
4017 Out << "declare";
4021 Out << ' ';
4023 Out << "define ";
4025 Out << getLinkageNameWithSpace(F->getLinkage());
4026 PrintDSOLocation(*F, Out);
4027 PrintVisibility(F->getVisibility(), Out);
4028 PrintDLLStorageClass(F->getDLLStorageClass(), Out);
4032 PrintCallingConv(F->getCallingConv(), Out);
4033 Out << " ";
4038 Out << Attrs.getAsString(AttributeList::ReturnIndex) << ' ';
4039 TypePrinter.print(F->getReturnType(), Out);
4041 Out << ' ';
4042 WriteAsOperandInternal(Out, F, WriterCtx);
4043 Out << '(';
4051 Out << ", ";
4053 TypePrinter.print(FT->getParamType(I), Out);
4057 Out << ' ';
4066 Out << ", ";
4073 if (FT->getNumParams()) Out << ", ";
4074 Out << "..."; // Output varargs portion of signature!
4076 Out << ')';
4079 Out << ' ' << UA;
4086 Out << " addrspace(" << F->getAddressSpace() << ")";
4088 Out << " #" << Machine.getAttributeGroupSlot(Attrs.getFnAttrs());
4090 Out << " section \"";
4091 printEscapedString(F->getSection(), Out);
4092 Out << '"';
4095 Out << " partition \"";
4096 printEscapedString(F->getPartition(), Out);
4097 Out << '"';
4099 maybePrintComdat(Out, *F);
4101 Out << " align " << A->value();
4103 Out << " gc \"" << F->getGC() << '"';
4105 Out << " prefix ";
4109 Out << " prologue ";
4113 Out << " personality ";
4118 Out << '\n';
4124 Out << " {";
4132 Out << "}\n";
4142 TypePrinter.print(Arg->getType(), Out);
4146 Out << ' ';
4152 Out << ' ';
4153 PrintLLVMName(Out, Arg);
4157 Out << " %" << Slot;
4165 Out << "\n";
4166 PrintLLVMName(Out, BB->getName(), LabelPrefix);
4167 Out << ':';
4169 Out << "\n";
4172 Out << Slot << ":";
4174 Out << "<badref>:";
4179 Out.PadToColumn(50);
4180 Out << ";";
4184 Out << " No predecessors!";
4186 Out << " preds = ";
4189 Out << ", ";
4195 Out << "\n";
4197 if (AnnotationWriter) AnnotationWriter->emitBasicBlockStartAnnot(BB, Out);
4206 if (AnnotationWriter) AnnotationWriter->emitBasicBlockEndAnnot(BB, Out);
4212 Out << '\n';
4218 Out << " ; (";
4220 Out << ", ";
4222 Out << ")";
4232 AnnotationWriter->printInfoComment(V, Out);
4237 raw_ostream &Out) {
4240 Out << " <cannot get addrspace!>";
4254 Out << " addrspace(" << CallAddrSpace << ")";
4259 if (AnnotationWriter) AnnotationWriter->emitInstructionAnnot(&I, Out);
4262 Out << " ";
4266 PrintLLVMName(Out, &I);
4267 Out << " = ";
4272 Out << "<badref> = ";
4274 Out << '%' << SlotNum << " = ";
4279 Out << "musttail ";
4281 Out << "tail ";
4283 Out << "notail ";
4287 Out << I.getOpcodeName();
4292 Out << " atomic";
4295 Out << " weak";
4302 Out << " volatile";
4305 WriteOptimizationInfo(Out, &I);
4309 Out << ' ' << CI->getPredicate();
4313 Out << ' ' << AtomicRMWInst::getOperationName(RMWI->getOperation());
4321 Out << ' ';
4323 Out << ", ";
4325 Out << ", ";
4331 Out << ' ';
4333 Out << ", ";
4335 Out << " [";
4337 Out << "\n ";
4339 Out << ", ";
4342 Out << "\n ]";
4345 Out << ' ';
4347 Out << ", [";
4351 Out << ", ";
4354 Out << ']';
4356 Out << ' ';
4357 TypePrinter.print(I.getType(), Out);
4358 Out << ' ';
4361 if (op) Out << ", ";
4362 Out << "[ ";
4363 writeOperand(PN->getIncomingValue(op), false); Out << ", ";
4364 writeOperand(PN->getIncomingBlock(op), false); Out << " ]";
4367 Out << ' ';
4370 Out << ", " << i;
4372 Out << ' ';
4373 writeOperand(I.getOperand(0), true); Out << ", ";
4376 Out << ", " << i;
4378 Out << ' ';
4379 TypePrinter.print(I.getType(), Out);
4381 Out << '\n';
4384 Out << " cleanup";
4387 if (i != 0 || LPI->isCleanup()) Out << "\n";
4389 Out << " catch ";
4391 Out << " filter ";
4396 Out << " within ";
4398 Out << " [";
4402 Out << ", ";
4406 Out << "] unwind ";
4410 Out << "to caller";
4412 Out << " within ";
4414 Out << " [";
4417 Out << ", ";
4420 Out << ']';
4422 Out << " void";
4424 Out << " from ";
4427 Out << " to ";
4430 Out << " from ";
4433 Out << " unwind ";
4437 Out << "to caller";
4441 Out << " ";
4442 PrintCallingConv(CI->getCallingConv(), Out);
4451 Out << ' ' << PAL.getAsString(AttributeList::ReturnIndex);
4454 maybePrintCallAddrSpace(Operand, &I, Out);
4459 Out << ' ';
4460 TypePrinter.print(FTy->isVarArg() ? FTy : RetTy, Out);
4461 Out << ' ';
4463 Out << '(';
4466 Out << ", ";
4476 Out << ", ";
4477 Out << "...";
4480 Out << ')';
4482 Out << " #" << Machine.getAttributeGroupSlot(PAL.getFnAttrs());
4493 Out << " ";
4494 PrintCallingConv(II->getCallingConv(), Out);
4498 Out << ' ' << PAL.getAsString(AttributeList::ReturnIndex);
4501 maybePrintCallAddrSpace(Operand, &I, Out);
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 << " unwind ";
4536 Out << " ";
4537 PrintCallingConv(CBI->getCallingConv(), Out);
4541 Out << ' ' << PAL.getAsString(AttributeList::ReturnIndex);
4547 Out << ' ';
4548 TypePrinter.print(FTy->isVarArg() ? FTy : RetTy, Out);
4549 Out << ' ';
4551 Out << '(';
4554 Out << ", ";
4558 Out << ')';
4560 Out << " #" << Machine.getAttributeGroupSlot(PAL.getFnAttrs());
4564 Out << "\n to ";
4566 Out << " [";
4569 Out << ", ";
4572 Out << ']';
4574 Out << ' ';
4576 Out << "inalloca ";
4578 Out << "swifterror ";
4579 TypePrinter.print(AI->getAllocatedType(), Out);
4587 Out << ", ";
4591 Out << ", align " << A->value();
4596 Out << ", addrspace(" << AddrSpace << ')';
4600 Out << ' ';
4603 Out << " to ";
4604 TypePrinter.print(I.getType(), Out);
4607 Out << ' ';
4610 Out << ", ";
4611 TypePrinter.print(I.getType(), Out);
4614 Out << ' ';
4615 TypePrinter.print(GEP->getSourceElementType(), Out);
4616 Out << ',';
4618 Out << ' ';
4619 TypePrinter.print(LI->getType(), Out);
4620 Out << ',';
4648 Out << ' ';
4649 TypePrinter.print(TheType, Out);
4652 Out << ' ';
4654 if (i) Out << ", ";
4664 Out << ", align " << A->value();
4669 Out << ", align " << A->value();
4673 Out << ", align " << CXI->getAlign().value();
4677 Out << ", align " << RMWI->getAlign().value();
4681 PrintShuffleMask(Out, SVI->getType(), SVI->getShuffleMask());
4698 Out << "\n";
4701 Out << " DbgMarker -> { ";
4703 Out << " }";
4717 Out << "#dbg_";
4720 Out << "value";
4723 Out << "declare";
4726 Out << "assign";
4732 Out << "(";
4733 WriteAsOperandInternal(Out, DVR.getRawLocation(), WriterCtx, true);
4734 Out << ", ";
4735 WriteAsOperandInternal(Out, DVR.getRawVariable(), WriterCtx, true);
4736 Out << ", ";
4737 WriteAsOperandInternal(Out, DVR.getRawExpression(), WriterCtx, true);
4738 Out << ", ";
4740 WriteAsOperandInternal(Out, DVR.getRawAssignID(), WriterCtx, true);
4741 Out << ", ";
4742 WriteAsOperandInternal(Out, DVR.getRawAddress(), WriterCtx, true);
4743 Out << ", ";
4744 WriteAsOperandInternal(Out, DVR.getRawAddressExpression(), WriterCtx, true);
4745 Out << ", ";
4747 WriteAsOperandInternal(Out, DVR.getDebugLoc().getAsMDNode(), WriterCtx, true);
4748 Out << ")";
4755 Out << " ";
4757 Out << '\n';
4762 Out << "#dbg_label(";
4763 WriteAsOperandInternal(Out, Label.getRawLabel(), WriterCtx, true);
4764 Out << ", ";
4765 WriteAsOperandInternal(Out, Label.getDebugLoc(), WriterCtx, true);
4766 Out << ")";
4781 Out << Separator;
4783 Out << "!";
4784 printMetadataIdentifier(MDNames[Kind], Out);
4786 Out << "!<unknown kind #" << Kind << ">";
4787 Out << ' ';
4788 WriteAsOperandInternal(Out, I.second, WriterCtx);
4793 Out << '!' << Slot << " = ";
4795 Out << "\n";
4811 WriteMDNodeBodyInternal(Out, Node, WriterCtx);
4816 Out << Attr.getAsString(InAttrGroup);
4820 Out << Attribute::getNameFromAttrKind(Attr.getKindAsEnum());
4822 Out << '(';
4823 TypePrinter.print(Ty, Out);
4824 Out << ')';
4833 Out << ' ';
4847 Out << "attributes #" << I.second << " = { "
4855 Out << " ";
4857 Out << "uselistorder";
4859 Out << "_bb ";
4861 Out << ", ";
4864 Out << " ";
4867 Out << ", { ";
4870 Out << Shuffle[0];
4872 Out << ", " << Shuffle[I];
4873 Out << " }\n";
4881 Out << "\n; uselistorder directives\n";