Lines Matching refs:Out

355 static void PrintCallingConv(unsigned cc, raw_ostream &Out) {
357 default: Out << "cc" << cc; break;
358 case CallingConv::Fast: Out << "fastcc"; break;
359 case CallingConv::Cold: Out << "coldcc"; break;
360 case CallingConv::WebKit_JS: Out << "webkit_jscc"; break;
361 case CallingConv::AnyReg: Out << "anyregcc"; break;
362 case CallingConv::PreserveMost: Out << "preserve_mostcc"; break;
363 case CallingConv::PreserveAll: Out << "preserve_allcc"; break;
364 case CallingConv::CXX_FAST_TLS: Out << "cxx_fast_tlscc"; break;
365 case CallingConv::GHC: Out << "ghccc"; break;
366 case CallingConv::Tail: Out << "tailcc"; break;
367 case CallingConv::CFGuard_Check: Out << "cfguard_checkcc"; break;
368 case CallingConv::X86_StdCall: Out << "x86_stdcallcc"; break;
369 case CallingConv::X86_FastCall: Out << "x86_fastcallcc"; break;
370 case CallingConv::X86_ThisCall: Out << "x86_thiscallcc"; break;
371 case CallingConv::X86_RegCall: Out << "x86_regcallcc"; break;
372 case CallingConv::X86_VectorCall:Out << "x86_vectorcallcc"; break;
373 case CallingConv::Intel_OCL_BI: Out << "intel_ocl_bicc"; break;
374 case CallingConv::ARM_APCS: Out << "arm_apcscc"; break;
375 case CallingConv::ARM_AAPCS: Out << "arm_aapcscc"; break;
376 case CallingConv::ARM_AAPCS_VFP: Out << "arm_aapcs_vfpcc"; break;
377 case CallingConv::AArch64_VectorCall: Out << "aarch64_vector_pcs"; break;
379 Out << "aarch64_sve_vector_pcs";
381 case CallingConv::MSP430_INTR: Out << "msp430_intrcc"; break;
382 case CallingConv::AVR_INTR: Out << "avr_intrcc "; break;
383 case CallingConv::AVR_SIGNAL: Out << "avr_signalcc "; break;
384 case CallingConv::PTX_Kernel: Out << "ptx_kernel"; break;
385 case CallingConv::PTX_Device: Out << "ptx_device"; break;
386 case CallingConv::X86_64_SysV: Out << "x86_64_sysvcc"; break;
387 case CallingConv::Win64: Out << "win64cc"; break;
388 case CallingConv::SPIR_FUNC: Out << "spir_func"; break;
389 case CallingConv::SPIR_KERNEL: Out << "spir_kernel"; break;
390 case CallingConv::Swift: Out << "swiftcc"; break;
391 case CallingConv::SwiftTail: Out << "swifttailcc"; break;
392 case CallingConv::X86_INTR: Out << "x86_intrcc"; break;
393 case CallingConv::HHVM: Out << "hhvmcc"; break;
394 case CallingConv::HHVM_C: Out << "hhvm_ccc"; break;
395 case CallingConv::AMDGPU_VS: Out << "amdgpu_vs"; break;
396 case CallingConv::AMDGPU_LS: Out << "amdgpu_ls"; break;
397 case CallingConv::AMDGPU_HS: Out << "amdgpu_hs"; break;
398 case CallingConv::AMDGPU_ES: Out << "amdgpu_es"; break;
399 case CallingConv::AMDGPU_GS: Out << "amdgpu_gs"; break;
400 case CallingConv::AMDGPU_PS: Out << "amdgpu_ps"; break;
401 case CallingConv::AMDGPU_CS: Out << "amdgpu_cs"; break;
402 case CallingConv::AMDGPU_KERNEL: Out << "amdgpu_kernel"; break;
403 case CallingConv::AMDGPU_Gfx: Out << "amdgpu_gfx"; break;
478 static void PrintShuffleMask(raw_ostream &Out, Type *Ty, ArrayRef<int> Mask) {
479 Out << ", <";
481 Out << "vscale x ";
482 Out << Mask.size() << " x i32> ";
485 Out << "zeroinitializer";
487 Out << "undef";
489 Out << "<";
494 Out << ", ";
495 Out << "i32 ";
497 Out << "undef";
499 Out << Elt;
501 Out << ">";
1295 static void WriteAsOperandInternal(raw_ostream &Out, const Value *V,
1300 static void WriteAsOperandInternal(raw_ostream &Out, const Metadata *MD,
1305 static void WriteOptimizationInfo(raw_ostream &Out, const User *U) {
1309 Out << " fast";
1312 Out << " reassoc";
1314 Out << " nnan";
1316 Out << " ninf";
1318 Out << " nsz";
1320 Out << " arcp";
1322 Out << " contract";
1324 Out << " afn";
1331 Out << " nuw";
1333 Out << " nsw";
1337 Out << " exact";
1340 Out << " inbounds";
1344 static void WriteConstantInternal(raw_ostream &Out, const Constant *CV,
1350 Out << (CI->getZExtValue() ? "true" : "false");
1353 Out << CI->getValue();
1383 Out << StrVal;
1408 Out << format_hex(apf.bitcastToAPInt().getZExtValue(), 0, /*Upper=*/true);
1415 Out << "0x";
1418 Out << 'K';
1419 Out << format_hex_no_prefix(API.getHiBits(16).getZExtValue(), 4,
1421 Out << format_hex_no_prefix(API.getLoBits(64).getZExtValue(), 16,
1425 Out << 'L';
1426 Out << format_hex_no_prefix(API.getLoBits(64).getZExtValue(), 16,
1428 Out << format_hex_no_prefix(API.getHiBits(64).getZExtValue(), 16,
1431 Out << 'M';
1432 Out << format_hex_no_prefix(API.getLoBits(64).getZExtValue(), 16,
1434 Out << format_hex_no_prefix(API.getHiBits(64).getZExtValue(), 16,
1437 Out << 'H';
1438 Out << format_hex_no_prefix(API.getZExtValue(), 4,
1441 Out << 'R';
1442 Out << format_hex_no_prefix(API.getZExtValue(), 4,
1450 Out << "zeroinitializer";
1455 Out << "blockaddress(";
1456 WriteAsOperandInternal(Out, BA->getFunction(), &TypePrinter, Machine,
1458 Out << ", ";
1459 WriteAsOperandInternal(Out, BA->getBasicBlock(), &TypePrinter, Machine,
1461 Out << ")";
1466 Out << "dso_local_equivalent ";
1467 WriteAsOperandInternal(Out, Equiv->getGlobalValue(), &TypePrinter, Machine,
1474 Out << '[';
1475 TypePrinter.print(ETy, Out);
1476 Out << ' ';
1477 WriteAsOperandInternal(Out, CA->getOperand(0),
1481 Out << ", ";
1482 TypePrinter.print(ETy, Out);
1483 Out << ' ';
1484 WriteAsOperandInternal(Out, CA->getOperand(i), &TypePrinter, Machine,
1487 Out << ']';
1495 Out << "c\"";
1496 printEscapedString(CA->getAsString(), Out);
1497 Out << '"';
1502 Out << '[';
1503 TypePrinter.print(ETy, Out);
1504 Out << ' ';
1505 WriteAsOperandInternal(Out, CA->getElementAsConstant(0),
1509 Out << ", ";
1510 TypePrinter.print(ETy, Out);
1511 Out << ' ';
1512 WriteAsOperandInternal(Out, CA->getElementAsConstant(i), &TypePrinter,
1515 Out << ']';
1521 Out << '<';
1522 Out << '{';
1525 Out << ' ';
1526 TypePrinter.print(CS->getOperand(0)->getType(), Out);
1527 Out << ' ';
1529 WriteAsOperandInternal(Out, CS->getOperand(0), &TypePrinter, Machine,
1533 Out << ", ";
1534 TypePrinter.print(CS->getOperand(i)->getType(), Out);
1535 Out << ' ';
1537 WriteAsOperandInternal(Out, CS->getOperand(i), &TypePrinter, Machine,
1540 Out << ' ';
1543 Out << '}';
1545 Out << '>';
1552 Out << '<';
1553 TypePrinter.print(ETy, Out);
1554 Out << ' ';
1555 WriteAsOperandInternal(Out, CV->getAggregateElement(0U), &TypePrinter,
1558 Out << ", ";
1559 TypePrinter.print(ETy, Out);
1560 Out << ' ';
1561 WriteAsOperandInternal(Out, CV->getAggregateElement(i), &TypePrinter,
1564 Out << '>';
1569 Out << "null";
1574 Out << "none";
1579 Out << "poison";
1584 Out << "undef";
1589 Out << CE->getOpcodeName();
1590 WriteOptimizationInfo(Out, CE);
1592 Out << ' ' << CmpInst::getPredicateName(
1594 Out << " (";
1598 TypePrinter.print(GEP->getSourceElementType(), Out);
1599 Out << ", ";
1607 Out << "inrange ";
1608 TypePrinter.print((*OI)->getType(), Out);
1609 Out << ' ';
1610 WriteAsOperandInternal(Out, *OI, &TypePrinter, Machine, Context);
1612 Out << ", ";
1618 Out << ", " << Indices[i];
1622 Out << " to ";
1623 TypePrinter.print(CE->getType(), Out);
1627 PrintShuffleMask(Out, CE->getType(), CE->getShuffleMask());
1629 Out << ')';
1633 Out << "<placeholder or erroneous Constant>";
1636 static void writeMDTuple(raw_ostream &Out, const MDTuple *Node,
1639 Out << "!{";
1643 Out << "null";
1646 TypePrinter->print(V->getType(), Out);
1647 Out << ' ';
1648 WriteAsOperandInternal(Out, V, TypePrinter, Machine, Context);
1650 WriteAsOperandInternal(Out, MD, TypePrinter, Machine, Context);
1653 Out << ", ";
1656 Out << "}";
1677 raw_ostream &Out;
1683 explicit MDFieldPrinter(raw_ostream &Out) : Out(Out) {}
1684 MDFieldPrinter(raw_ostream &Out, TypePrinting *TypePrinter,
1686 : Out(Out), TypePrinter(TypePrinter), Machine(Machine), Context(Context) {
1714 Out << FS << "tag: ";
1717 Out << Tag;
1719 Out << N->getTag();
1723 Out << FS << "type: ";
1726 Out << Type;
1728 Out << N->getMacinfoType();
1733 Out << FS << "checksumkind: " << Checksum.getKindAsString();
1742 Out << FS << Name << ": \"";
1743 printEscapedString(Value, Out);
1744 Out << "\"";
1747 static void writeMetadataAsOperand(raw_ostream &Out, const Metadata *MD,
1752 Out << "null";
1755 WriteAsOperandInternal(Out, MD, TypePrinter, Machine, Context);
1763 Out << FS << Name << ": ";
1764 writeMetadataAsOperand(Out, MD, TypePrinter, Machine, Context);
1772 Out << FS << Name << ": " << Int;
1780 Out << FS << Name << ": ";
1781 Int.print(Out, !IsUnsigned);
1788 Out << FS << Name << ": " << (Value ? "true" : "false");
1795 Out << FS << Name << ": ";
1804 Out << FlagsFS << StringF;
1807 Out << FlagsFS << Extra;
1814 Out << FS << Name << ": ";
1817 Out << 0;
1828 Out << FlagsFS << StringF;
1831 Out << FlagsFS << Extra;
1836 Out << FS << Name << ": " << DICompileUnit::emissionKindString(EK);
1843 Out << FS << Name << ": " << DICompileUnit::nameTableKindString(NTK);
1852 Out << FS << Name << ": ";
1855 Out << S;
1857 Out << Value;
1860 static void writeGenericDINode(raw_ostream &Out, const GenericDINode *N,
1863 Out << "!GenericDINode(";
1864 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
1868 Out << Printer.FS << "operands: {";
1871 Out << IFS;
1872 writeMetadataAsOperand(Out, I, TypePrinter, Machine, Context);
1874 Out << "}";
1876 Out << ")";
1879 static void writeDILocation(raw_ostream &Out, const DILocation *DL,
1882 Out << "!DILocation(";
1883 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
1891 Out << ")";
1894 static void writeDISubrange(raw_ostream &Out, const DISubrange *N,
1897 Out << "!DISubrange(";
1898 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
1933 Out << ")";
1936 static void writeDIGenericSubrange(raw_ostream &Out, const DIGenericSubrange *N,
1940 Out << "!DIGenericSubrange(";
1941 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
1987 Out << ")";
1990 static void writeDIEnumerator(raw_ostream &Out, const DIEnumerator *N,
1992 Out << "!DIEnumerator(";
1993 MDFieldPrinter Printer(Out);
1999 Out << ")";
2002 static void writeDIBasicType(raw_ostream &Out, const DIBasicType *N,
2004 Out << "!DIBasicType(";
2005 MDFieldPrinter Printer(Out);
2014 Out << ")";
2017 static void writeDIStringType(raw_ostream &Out, const DIStringType *N,
2020 Out << "!DIStringType(";
2021 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2031 Out << ")";
2034 static void writeDIDerivedType(raw_ostream &Out, const DIDerivedType *N,
2037 Out << "!DIDerivedType(";
2038 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2054 Out << ")";
2057 static void writeDICompositeType(raw_ostream &Out, const DICompositeType *N,
2060 Out << "!DICompositeType(";
2061 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2087 Out << ")";
2090 static void writeDISubroutineType(raw_ostream &Out, const DISubroutineType *N,
2093 Out << "!DISubroutineType(";
2094 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2099 Out << ")";
2102 static void writeDIFile(raw_ostream &Out, const DIFile *N, TypePrinting *,
2104 Out << "!DIFile(";
2105 MDFieldPrinter Printer(Out);
2115 Out << ")";
2118 static void writeDICompileUnit(raw_ostream &Out, const DICompileUnit *N,
2121 Out << "!DICompileUnit(";
2122 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2146 Out << ")";
2149 static void writeDISubprogram(raw_ostream &Out, const DISubprogram *N,
2152 Out << "!DISubprogram(";
2153 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2173 Out << ")";
2176 static void writeDILexicalBlock(raw_ostream &Out, const DILexicalBlock *N,
2179 Out << "!DILexicalBlock(";
2180 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2185 Out << ")";
2188 static void writeDILexicalBlockFile(raw_ostream &Out,
2193 Out << "!DILexicalBlockFile(";
2194 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2199 Out << ")";
2202 static void writeDINamespace(raw_ostream &Out, const DINamespace *N,
2205 Out << "!DINamespace(";
2206 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2210 Out << ")";
2213 static void writeDICommonBlock(raw_ostream &Out, const DICommonBlock *N,
2216 Out << "!DICommonBlock(";
2217 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2223 Out << ")";
2226 static void writeDIMacro(raw_ostream &Out, const DIMacro *N,
2229 Out << "!DIMacro(";
2230 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2235 Out << ")";
2238 static void writeDIMacroFile(raw_ostream &Out, const DIMacroFile *N,
2241 Out << "!DIMacroFile(";
2242 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2246 Out << ")";
2249 static void writeDIModule(raw_ostream &Out, const DIModule *N,
2252 Out << "!DIModule(";
2253 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2262 Out << ")";
2266 static void writeDITemplateTypeParameter(raw_ostream &Out,
2271 Out << "!DITemplateTypeParameter(";
2272 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2276 Out << ")";
2279 static void writeDITemplateValueParameter(raw_ostream &Out,
2284 Out << "!DITemplateValueParameter(";
2285 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2292 Out << ")";
2295 static void writeDIGlobalVariable(raw_ostream &Out, const DIGlobalVariable *N,
2298 Out << "!DIGlobalVariable(";
2299 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2311 Out << ")";
2314 static void writeDILocalVariable(raw_ostream &Out, const DILocalVariable *N,
2317 Out << "!DILocalVariable(";
2318 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2327 Out << ")";
2330 static void writeDILabel(raw_ostream &Out, const DILabel *N,
2333 Out << "!DILabel(";
2334 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2339 Out << ")";
2342 static void writeDIExpression(raw_ostream &Out, const DIExpression *N,
2345 Out << "!DIExpression(";
2352 Out << FS << OpStr;
2354 Out << FS << Op.getArg(0);
2355 Out << FS << dwarf::AttributeEncodingString(Op.getArg(1));
2358 Out << FS << Op.getArg(A);
2363 Out << FS << I;
2365 Out << ")";
2368 static void writeDIArgList(raw_ostream &Out, const DIArgList *N,
2373 Out << "!DIArgList(";
2375 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2377 Out << FS;
2378 WriteAsOperandInternal(Out, Arg, TypePrinter, Machine, Context, true);
2380 Out << ")";
2383 static void writeDIGlobalVariableExpression(raw_ostream &Out,
2388 Out << "!DIGlobalVariableExpression(";
2389 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2392 Out << ")";
2395 static void writeDIObjCProperty(raw_ostream &Out, const DIObjCProperty *N,
2398 Out << "!DIObjCProperty(";
2399 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2407 Out << ")";
2410 static void writeDIImportedEntity(raw_ostream &Out, const DIImportedEntity *N,
2413 Out << "!DIImportedEntity(";
2414 MDFieldPrinter Printer(Out, TypePrinter, Machine, Context);
2421 Out << ")";
2424 static void WriteMDNodeBodyInternal(raw_ostream &Out, const MDNode *Node,
2429 Out << "distinct ";
2431 Out << "<temporary!> "; // Handle broken code.
2438 write##CLASS(Out, cast<CLASS>(Node), TypePrinter, Machine, Context); \
2446 static void WriteAsOperandInternal(raw_ostream &Out, const Value *V,
2451 PrintLLVMName(Out, V);
2458 WriteConstantInternal(Out, CV, *TypePrinter, Machine, Context);
2463 Out << "asm ";
2465 Out << "sideeffect ";
2467 Out << "alignstack ";
2470 Out << "inteldialect ";
2472 Out << "unwind ";
2473 Out << '"';
2474 printEscapedString(IA->getAsmString(), Out);
2475 Out << "\", \"";
2476 printEscapedString(IA->getConstraintString(), Out);
2477 Out << '"';
2482 WriteAsOperandInternal(Out, MD->getMetadata(), TypePrinter, Machine,
2521 Out << Prefix << Slot;
2523 Out << "<badref>";
2526 static void WriteAsOperandInternal(raw_ostream &Out, const Metadata *MD,
2533 writeDIExpression(Out, Expr, TypePrinter, Machine, Context);
2537 writeDIArgList(Out, ArgList, TypePrinter, Machine, Context, FromValue);
2550 writeDILocation(Out, Loc, TypePrinter, Machine, Context);
2555 Out << "<" << N << ">";
2557 Out << '!' << Slot;
2562 Out << "!\"";
2563 printEscapedString(MDS->getString(), Out);
2564 Out << '"';
2573 TypePrinter->print(V->getValue()->getType(), Out);
2574 Out << ' ';
2575 WriteAsOperandInternal(Out, V->getValue(), TypePrinter, Machine, Context);
2581 formatted_raw_ostream &Out;
2683 : Out(o), TheModule(M), Machine(Mac), TypePrinter(M), AnnotationWriter(AAW),
2695 : Out(o), TheIndex(Index), Machine(Mac), TypePrinter(/*Module=*/nullptr),
2700 Out << "<null operand!>";
2704 TypePrinter.print(Operand->getType(), Out);
2705 Out << ' ';
2707 WriteAsOperandInternal(Out, Operand, &TypePrinter, &Machine, TheModule);
2720 Out << " syncscope(\"";
2721 printEscapedString(SSNs[SSID], Out);
2722 Out << "\")";
2735 Out << " " << toIRString(Ordering);
2746 Out << " " << toIRString(SuccessOrdering);
2747 Out << " " << toIRString(FailureOrdering);
2753 Out << "<null operand!>";
2758 TypePrinter.print(Operand->getType(), Out);
2761 Out << ' ';
2764 Out << ' ';
2766 WriteAsOperandInternal(Out, Operand, &TypePrinter, &Machine, TheModule);
2773 Out << " [ ";
2780 Out << ", ";
2783 Out << '"';
2784 printEscapedString(BU.getTagName(), Out);
2785 Out << '"';
2787 Out << '(';
2792 Out << ", ";
2795 TypePrinter.print(Input->getType(), Out);
2796 Out << " ";
2797 WriteAsOperandInternal(Out, Input, &TypePrinter, &Machine, TheModule);
2800 Out << ')';
2803 Out << " ]";
2816 Out << "; ModuleID = '" << M->getModuleIdentifier() << "'\n";
2819 Out << "source_filename = \"";
2820 printEscapedString(M->getSourceFileName(), Out);
2821 Out << "\"\n";
2826 Out << "target datalayout = \"" << DL << "\"\n";
2828 Out << "target triple = \"" << M->getTargetTriple() << "\"\n";
2831 Out << '\n';
2841 Out << "module asm \"";
2842 printEscapedString(Front, Out);
2843 Out << "\"\n";
2851 Out << '\n';
2855 Out << '\n';
2859 if (!M->global_empty()) Out << '\n';
2861 printGlobal(&GV); Out << '\n';
2865 if (!M->alias_empty()) Out << "\n";
2870 if (!M->ifunc_empty()) Out << "\n";
2879 Out << '\n';
2886 Out << '\n';
2891 if (!M->named_metadata_empty()) Out << '\n';
2898 Out << '\n';
2907 Out << "\n";
2925 Out << "^" << i++ << " = module: (";
2926 Out << "path: \"";
2927 printEscapedString(ModPair.first, Out);
2928 Out << "\", hash: (";
2931 Out << FS << Hash;
2932 Out << "))\n";
2952 Out << "^" << Machine.getTypeIdSlot(TID.second.first)
2955 Out << ") ; guid = " << TID.first << "\n";
2961 Out << "^" << Machine.getGUIDSlot(GUID)
2964 Out << ") ; guid = " << GUID << "\n";
2969 Out << "^" << NumSlots << " = flags: " << TheIndex->getFlags() << "\n";
2973 Out << "^" << NumSlots << " = blockcount: " << TheIndex->getBlockCount()
3024 Out << "typeTestRes: (kind: " << getTTResKindName(TTRes.TheKind)
3030 Out << ", alignLog2: " << TTRes.AlignLog2;
3032 Out << ", sizeM1: " << TTRes.SizeM1;
3035 Out << ", bitMask: " << (unsigned)TTRes.BitMask;
3037 Out << ", inlineBits: " << TTRes.InlineBits;
3039 Out << ")";
3043 Out << ", summary: (";
3046 Out << ", wpdResolutions: (";
3049 Out << FS;
3050 Out << "(offset: " << WPDRes.first << ", ";
3052 Out << ")";
3054 Out << ")";
3056 Out << ")";
3061 Out << ", summary: (";
3064 Out << FS;
3065 Out << "(offset: " << P.AddressPointOffset << ", ";
3066 Out << "^" << Machine.getGUIDSlot(P.VTableVI.getGUID());
3067 Out << ")";
3069 Out << ")";
3073 Out << "args: (";
3076 Out << FS;
3077 Out << arg;
3079 Out << ")";
3083 Out << "wpdRes: (kind: ";
3084 Out << getWholeProgDevirtResKindName(WPDRes.TheKind);
3087 Out << ", singleImplName: \"" << WPDRes.SingleImplName << "\"";
3090 Out << ", resByArg: (";
3093 Out << FS;
3095 Out << ", byArg: (kind: ";
3096 Out << getWholeProgDevirtResByArgKindName(ResByArg.second.TheKind);
3101 Out << ", info: " << ResByArg.second.Info;
3106 Out << ", byte: " << ResByArg.second.Byte
3109 Out << ")";
3111 Out << ")";
3113 Out << ")";
3129 Out << ", aliasee: ";
3134 Out << "^" << Machine.getGUIDSlot(SummaryToGUIDMap[&AS->getAliasee()]);
3136 Out << "null";
3141 Out << ", varFlags: (readonly: " << GS->VarFlags.MaybeReadOnly << ", "
3145 Out << ", "
3147 Out << ")";
3150 Out << ", vTableFuncs: (";
3153 Out << FS;
3154 Out << "(virtFunc: ^" << Machine.getGUIDSlot(P.FuncVI.getGUID())
3156 Out << ")";
3158 Out << ")";
3212 Out << ", insts: " << FS->instCount();
3217 Out << ", funcFlags: (";
3218 Out << "readNone: " << FFlags.ReadNone;
3219 Out << ", readOnly: " << FFlags.ReadOnly;
3220 Out << ", noRecurse: " << FFlags.NoRecurse;
3221 Out << ", returnDoesNotAlias: " << FFlags.ReturnDoesNotAlias;
3222 Out << ", noInline: " << FFlags.NoInline;
3223 Out << ", alwaysInline: " << FFlags.AlwaysInline;
3224 Out << ")";
3227 Out << ", calls: (";
3230 Out << IFS;
3231 Out << "(callee: ^" << Machine.getGUIDSlot(Call.first.getGUID());
3233 Out << ", hotness: " << getHotnessName(Call.second.getHotness());
3235 Out << ", relbf: " << Call.second.RelBlockFreq;
3236 Out << ")";
3238 Out << ")";
3245 Out << "[" << Range.getSignedMin() << ", " << Range.getSignedMax() << "]";
3249 Out << ", params: (";
3252 Out << IFS;
3253 Out << "(param: " << PS.ParamNo;
3254 Out << ", offset: ";
3257 Out << ", calls: (";
3260 Out << IFS;
3261 Out << "(callee: ^" << Machine.getGUIDSlot(Call.Callee.getGUID());
3262 Out << ", param: " << Call.ParamNo;
3263 Out << ", offset: ";
3265 Out << ")";
3267 Out << ")";
3269 Out << ")";
3271 Out << ")";
3277 Out << ", typeIdInfo: (";
3280 Out << TIDFS;
3281 Out << "typeTests: (";
3286 Out << FS;
3287 Out << GUID;
3292 Out << FS;
3295 Out << "^" << Slot;
3298 Out << ")";
3301 Out << TIDFS;
3305 Out << TIDFS;
3309 Out << TIDFS;
3314 Out << TIDFS;
3318 Out << ")";
3324 Out << "vFuncId: (";
3325 Out << "guid: " << VFId.GUID;
3326 Out << ", offset: " << VFId.Offset;
3327 Out << ")";
3333 Out << FS;
3334 Out << "vFuncId: (";
3337 Out << "^" << Slot;
3338 Out << ", offset: " << VFId.Offset;
3339 Out << ")";
3345 Out << Tag << ": (";
3348 Out << FS;
3351 Out << ")";
3357 Out << Tag << ": (";
3360 Out << FS;
3361 Out << "(";
3364 Out << ", ";
3367 Out << ")";
3369 Out << ")";
3375 Out << getSummaryKindName(Summary.getSummaryKind()) << ": ";
3376 Out << "(module: ^" << Machine.getModulePathSlot(Summary.modulePath())
3378 Out << "linkage: " << getLinkageName(LT);
3379 Out << ", visibility: "
3381 Out << ", notEligibleToImport: " << GVFlags.NotEligibleToImport;
3382 Out << ", live: " << GVFlags.Live;
3383 Out << ", dsoLocal: " << GVFlags.DSOLocal;
3384 Out << ", canAutoHide: " << GVFlags.CanAutoHide;
3385 Out << ")";
3396 Out << ", refs: (";
3399 Out << FS;
3401 Out << "readonly ";
3403 Out << "writeonly ";
3404 Out << "^" << Machine.getGUIDSlot(Ref.getGUID());
3406 Out << ")";
3409 Out << ")";
3413 Out << "^" << Slot << " = gv: (";
3415 Out << "name: \"" << VI.name() << "\"";
3417 Out << "guid: " << VI.getGUID();
3419 Out << ", summaries: (";
3422 Out << FS;
3425 Out << ")";
3427 Out << ")";
3429 Out << " ; guid = " << VI.getGUID();
3430 Out << "\n";
3434 formatted_raw_ostream &Out) {
3436 Out << "<empty name> ";
3440 Out << Name[0];
3442 Out << '\\' << hexdigit(Name[0] >> 4) << hexdigit(Name[0] & 0x0F);
3447 Out << C;
3449 Out << '\\' << hexdigit(C >> 4) << hexdigit(C & 0x0F);
3455 Out << '!';
3456 printMetadataIdentifier(NMD->getName(), Out);
3457 Out << " = !{";
3460 Out << ", ";
3468 writeDIExpression(Out, Expr, nullptr, nullptr, nullptr);
3474 Out << "<badref>";
3476 Out << '!' << Slot;
3478 Out << "}\n";
3482 formatted_raw_ostream &Out) {
3485 case GlobalValue::HiddenVisibility: Out << "hidden "; break;
3486 case GlobalValue::ProtectedVisibility: Out << "protected "; break;
3491 formatted_raw_ostream &Out) {
3493 Out << "dso_local ";
3497 formatted_raw_ostream &Out) {
3500 case GlobalValue::DLLImportStorageClass: Out << "dllimport "; break;
3501 case GlobalValue::DLLExportStorageClass: Out << "dllexport "; break;
3506 formatted_raw_ostream &Out) {
3511 Out << "thread_local ";
3514 Out << "thread_local(localdynamic) ";
3517 Out << "thread_local(initialexec) ";
3520 Out << "thread_local(localexec) ";
3537 static void maybePrintComdat(formatted_raw_ostream &Out,
3544 Out << ',';
3545 Out << " comdat";
3550 Out << '(';
3551 PrintLLVMName(Out, C->getName(), ComdatPrefix);
3552 Out << ')';
3557 Out << "; Materializable\n";
3559 WriteAsOperandInternal(Out, GV, &TypePrinter, &Machine, GV->getParent());
3560 Out << " = ";
3563 Out << "external ";
3565 Out << getLinkageNameWithSpace(GV->getLinkage());
3566 PrintDSOLocation(*GV, Out);
3567 PrintVisibility(GV->getVisibility(), Out);
3568 PrintDLLStorageClass(GV->getDLLStorageClass(), Out);
3569 PrintThreadLocalModel(GV->getThreadLocalMode(), Out);
3572 Out << UA << ' ';
3575 Out << "addrspace(" << AddressSpace << ") ";
3576 if (GV->isExternallyInitialized()) Out << "externally_initialized ";
3577 Out << (GV->isConstant() ? "constant " : "global ");
3578 TypePrinter.print(GV->getValueType(), Out);
3581 Out << ' ';
3586 Out << ", section \"";
3587 printEscapedString(GV->getSection(), Out);
3588 Out << '"';
3591 Out << ", partition \"";
3592 printEscapedString(GV->getPartition(), Out);
3593 Out << '"';
3596 maybePrintComdat(Out, *GV);
3598 Out << ", align " << GV->getAlignment();
3606 Out << " #" << Machine.getAttributeGroupSlot(Attrs);
3613 Out << "; Materializable\n";
3615 WriteAsOperandInternal(Out, GIS, &TypePrinter, &Machine, GIS->getParent());
3616 Out << " = ";
3618 Out << getLinkageNameWithSpace(GIS->getLinkage());
3619 PrintDSOLocation(*GIS, Out);
3620 PrintVisibility(GIS->getVisibility(), Out);
3621 PrintDLLStorageClass(GIS->getDLLStorageClass(), Out);
3622 PrintThreadLocalModel(GIS->getThreadLocalMode(), Out);
3625 Out << UA << ' ';
3628 Out << "alias ";
3630 Out << "ifunc ";
3634 TypePrinter.print(GIS->getValueType(), Out);
3636 Out << ", ";
3641 TypePrinter.print(GIS->getType(), Out);
3642 Out << " <<NULL ALIASEE>>";
3648 Out << ", partition \"";
3649 printEscapedString(GIS->getPartition(), Out);
3650 Out << '"';
3654 Out << '\n';
3658 C->print(Out);
3665 Out << '\n';
3670 Out << '%' << I << " = type ";
3674 TypePrinter.printStructBody(NumberedTypes[I], Out);
3675 Out << '\n';
3680 PrintLLVMName(Out, NamedTypes[I]->getName(), LocalPrefix);
3681 Out << " = type ";
3685 TypePrinter.printStructBody(NamedTypes[I], Out);
3686 Out << '\n';
3692 if (AnnotationWriter) AnnotationWriter->emitFunctionAnnot(F, Out);
3695 Out << "; Materializable\n";
3710 Out << "; Function Attrs: " << AttrStr << '\n';
3716 Out << "declare";
3720 Out << ' ';
3722 Out << "define ";
3724 Out << getLinkageNameWithSpace(F->getLinkage());
3725 PrintDSOLocation(*F, Out);
3726 PrintVisibility(F->getVisibility(), Out);
3727 PrintDLLStorageClass(F->getDLLStorageClass(), Out);
3731 PrintCallingConv(F->getCallingConv(), Out);
3732 Out << " ";
3737 Out << Attrs.getAsString(AttributeList::ReturnIndex) << ' ';
3738 TypePrinter.print(F->getReturnType(), Out);
3739 Out << ' ';
3740 WriteAsOperandInternal(Out, F, &TypePrinter, &Machine, F->getParent());
3741 Out << '(';
3749 Out << ", ";
3751 TypePrinter.print(FT->getParamType(I), Out);
3755 Out << ' ';
3764 Out << ", ";
3771 if (FT->getNumParams()) Out << ", ";
3772 Out << "..."; // Output varargs portion of signature!
3774 Out << ')';
3777 Out << ' ' << UA;
3784 Out << " addrspace(" << F->getAddressSpace() << ")";
3786 Out << " #" << Machine.getAttributeGroupSlot(Attrs.getFnAttributes());
3788 Out << " section \"";
3789 printEscapedString(F->getSection(), Out);
3790 Out << '"';
3793 Out << " partition \"";
3794 printEscapedString(F->getPartition(), Out);
3795 Out << '"';
3797 maybePrintComdat(Out, *F);
3799 Out << " align " << F->getAlignment();
3801 Out << " gc \"" << F->getGC() << '"';
3803 Out << " prefix ";
3807 Out << " prologue ";
3811 Out << " personality ";
3816 Out << '\n';
3822 Out << " {";
3830 Out << "}\n";
3840 TypePrinter.print(Arg->getType(), Out);
3844 Out << ' ';
3850 Out << ' ';
3851 PrintLLVMName(Out, Arg);
3855 Out << " %" << Slot;
3864 Out << "\n";
3865 PrintLLVMName(Out, BB->getName(), LabelPrefix);
3866 Out << ':';
3868 Out << "\n";
3871 Out << Slot << ":";
3873 Out << "<badref>:";
3878 Out.PadToColumn(50);
3879 Out << ";";
3883 Out << " No predecessors!";
3885 Out << " preds = ";
3888 Out << ", ";
3894 Out << "\n";
3896 if (AnnotationWriter) AnnotationWriter->emitBasicBlockStartAnnot(BB, Out);
3903 if (AnnotationWriter) AnnotationWriter->emitBasicBlockEndAnnot(BB, Out);
3909 Out << '\n';
3915 Out << " ; (";
3917 Out << ", ";
3919 Out << ")";
3929 AnnotationWriter->printInfoComment(V, Out);
3933 raw_ostream &Out) {
3946 Out << " addrspace(" << CallAddrSpace << ")";
3951 if (AnnotationWriter) AnnotationWriter->emitInstructionAnnot(&I, Out);
3954 Out << " ";
3958 PrintLLVMName(Out, &I);
3959 Out << " = ";
3964 Out << "<badref> = ";
3966 Out << '%' << SlotNum << " = ";
3971 Out << "musttail ";
3973 Out << "tail ";
3975 Out << "notail ";
3979 Out << I.getOpcodeName();
3984 Out << " atomic";
3987 Out << " weak";
3994 Out << " volatile";
3997 WriteOptimizationInfo(Out, &I);
4001 Out << ' ' << CmpInst::getPredicateName(CI->getPredicate());
4005 Out << ' ' << AtomicRMWInst::getOperationName(RMWI->getOperation());
4013 Out << ' ';
4015 Out << ", ";
4017 Out << ", ";
4023 Out << ' ';
4025 Out << ", ";
4027 Out << " [";
4029 Out << "\n ";
4031 Out << ", ";
4034 Out << "\n ]";
4037 Out << ' ';
4039 Out << ", [";
4043 Out << ", ";
4046 Out << ']';
4048 Out << ' ';
4049 TypePrinter.print(I.getType(), Out);
4050 Out << ' ';
4053 if (op) Out << ", ";
4054 Out << "[ ";
4055 writeOperand(PN->getIncomingValue(op), false); Out << ", ";
4056 writeOperand(PN->getIncomingBlock(op), false); Out << " ]";
4059 Out << ' ';
4062 Out << ", " << i;
4064 Out << ' ';
4065 writeOperand(I.getOperand(0), true); Out << ", ";
4068 Out << ", " << i;
4070 Out << ' ';
4071 TypePrinter.print(I.getType(), Out);
4073 Out << '\n';
4076 Out << " cleanup";
4079 if (i != 0 || LPI->isCleanup()) Out << "\n";
4081 Out << " catch ";
4083 Out << " filter ";
4088 Out << " within ";
4090 Out << " [";
4094 Out << ", ";
4098 Out << "] unwind ";
4102 Out << "to caller";
4104 Out << " within ";
4106 Out << " [";
4110 Out << ", ";
4113 Out << ']';
4115 Out << " void";
4117 Out << " from ";
4120 Out << " to ";
4123 Out << " from ";
4126 Out << " unwind ";
4130 Out << "to caller";
4134 Out << " ";
4135 PrintCallingConv(CI->getCallingConv(), Out);
4144 Out << ' ' << PAL.getAsString(AttributeList::ReturnIndex);
4147 maybePrintCallAddrSpace(Operand, &I, Out);
4153 Out << ' ';
4154 TypePrinter.print(FTy->isVarArg() ? FTy : RetTy, Out);
4155 Out << ' ';
4157 Out << '(';
4160 Out << ", ";
4169 Out << ", ...";
4171 Out << ')';
4173 Out << " #" << Machine.getAttributeGroupSlot(PAL.getFnAttributes());
4184 Out << " ";
4185 PrintCallingConv(II->getCallingConv(), Out);
4189 Out << ' ' << PAL.getAsString(AttributeList::ReturnIndex);
4192 maybePrintCallAddrSpace(Operand, &I, Out);
4198 Out << ' ';
4199 TypePrinter.print(FTy->isVarArg() ? FTy : RetTy, Out);
4200 Out << ' ';
4202 Out << '(';
4205 Out << ", ";
4209 Out << ')';
4211 Out << " #" << Machine.getAttributeGroupSlot(PAL.getFnAttributes());
4215 Out << "\n to ";
4217 Out << " unwind ";
4227 Out << " ";
4228 PrintCallingConv(CBI->getCallingConv(), Out);
4232 Out << ' ' << PAL.getAsString(AttributeList::ReturnIndex);
4238 Out << ' ';
4239 TypePrinter.print(FTy->isVarArg() ? FTy : RetTy, Out);
4240 Out << ' ';
4242 Out << '(';
4245 Out << ", ";
4249 Out << ')';
4251 Out << " #" << Machine.getAttributeGroupSlot(PAL.getFnAttributes());
4255 Out << "\n to ";
4257 Out << " [";
4260 Out << ", ";
4263 Out << ']';
4265 Out << ' ';
4267 Out << "inalloca ";
4269 Out << "swifterror ";
4270 TypePrinter.print(AI->getAllocatedType(), Out);
4278 Out << ", ";
4282 Out << ", align " << AI->getAlignment();
4287 Out << ", addrspace(" << AddrSpace << ')';
4291 Out << ' ';
4294 Out << " to ";
4295 TypePrinter.print(I.getType(), Out);
4298 Out << ' ';
4301 Out << ", ";
4302 TypePrinter.print(I.getType(), Out);
4305 Out << ' ';
4306 TypePrinter.print(GEP->getSourceElementType(), Out);
4307 Out << ',';
4309 Out << ' ';
4310 TypePrinter.print(LI->getType(), Out);
4311 Out << ',';
4337 Out << ' ';
4338 TypePrinter.print(TheType, Out);
4341 Out << ' ';
4343 if (i) Out << ", ";
4353 Out << ", align " << LI->getAlignment();
4358 Out << ", align " << SI->getAlignment();
4362 Out << ", align " << CXI->getAlign().value();
4366 Out << ", align " << RMWI->getAlign().value();
4370 PrintShuffleMask(Out, SVI->getType(), SVI->getShuffleMask());
4393 Out << Separator;
4395 Out << "!";
4396 printMetadataIdentifier(MDNames[Kind], Out);
4398 Out << "!<unknown kind #" << Kind << ">";
4399 Out << ' ';
4400 WriteAsOperandInternal(Out, I.second, &TypePrinter, &Machine, TheModule);
4405 Out << '!' << Slot << " = ";
4407 Out << "\n";
4422 WriteMDNodeBodyInternal(Out, Node, &TypePrinter, &Machine, TheModule);
4427 Out << Attr.getAsString(InAttrGroup);
4432 Out << "byval";
4434 Out << "sret";
4436 Out << "byref";
4438 Out << "preallocated";
4440 Out << "inalloca";
4446 Out << '(';
4447 TypePrinter.print(Ty, Out);
4448 Out << ')';
4457 Out << ' ';
4471 Out << "attributes #" << I.second << " = { "
4478 Out << " ";
4480 Out << "uselistorder";
4483 Out << "_bb ";
4485 Out << ", ";
4488 Out << " ";
4491 Out << ", { ";
4494 Out << Order.Shuffle[0];
4496 Out << ", " << Order.Shuffle[I];
4497 Out << " }\n";
4507 Out << "\n; uselistorder directives\n";