Lines Matching full:go

301     if (auto *GO = dyn_cast<GlobalObject>(GV))  in getModuleMetadata()  local
302 Used.insert(GO); in getModuleMetadata()
580 static const MCSymbolELF *getLinkedToSymbol(const GlobalObject *GO, in getLinkedToSymbol() argument
582 MDNode *MD = GO->getMetadata(LLVMContext::MD_associated); in getLinkedToSymbol()
636 getELFSectionNameForGlobal(const GlobalObject *GO, SectionKind Kind, in getELFSectionNameForGlobal() argument
640 getSectionPrefixForGlobal(Kind, TM.isLargeGlobalValue(GO)); in getELFSectionNameForGlobal()
645 Align Alignment = GO->getDataLayout().getPreferredAlign( in getELFSectionNameForGlobal()
646 cast<GlobalVariable>(GO)); in getELFSectionNameForGlobal()
658 if (const auto *F = dyn_cast<Function>(GO)) { in getELFSectionNameForGlobal()
667 TM.getNameWithPrefix(Name, GO, Mang, /*MayAlwaysUsePrivate*/true); in getELFSectionNameForGlobal()
690 calcUniqueIDUpdateFlagsAndSize(const GlobalObject *GO, StringRef SectionName, in calcUniqueIDUpdateFlagsAndSize() argument
703 const bool Associated = GO->getMetadata(LLVMContext::MD_associated); in calcUniqueIDUpdateFlagsAndSize()
758 getELFSectionNameForGlobal(GO, Kind, Mang, TM, EntrySize, false); in calcUniqueIDUpdateFlagsAndSize()
770 getGlobalObjectInfo(const GlobalObject *GO, const TargetMachine &TM) { in getGlobalObjectInfo() argument
774 if (const Comdat *C = getELFComdat(GO)) { in getGlobalObjectInfo()
779 if (TM.isLargeGlobalValue(GO)) in getGlobalObjectInfo()
785 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM, in selectExplicitSectionGlobal() argument
788 StringRef SectionName = GO->getSection(); in selectExplicitSectionGlobal()
793 const GlobalVariable *GV = dyn_cast<GlobalVariable>(GO); in selectExplicitSectionGlobal()
811 auto [Group, IsComdat, ExtraFlags] = getGlobalObjectInfo(GO, TM); in selectExplicitSectionGlobal()
816 GO, SectionName, Kind, TM, Ctx, Mang, Flags, EntrySize, NextUniqueID, in selectExplicitSectionGlobal()
819 const MCSymbolELF *LinkedToSym = getLinkedToSymbol(GO, TM); in selectExplicitSectionGlobal()
835 GO->getContext().diagnose(LoweringDiagnosticInfo( in selectExplicitSectionGlobal()
836 "Symbol '" + GO->getName() + "' from module '" + in selectExplicitSectionGlobal()
837 (GO->getParent() ? GO->getParent()->getSourceFileName() : "unknown") + in selectExplicitSectionGlobal()
849 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument
850 return selectExplicitSectionGlobal(GO, Kind, TM, getContext(), getMangler(), in getExplicitSectionGlobal()
851 NextUniqueID, Used.count(GO), in getExplicitSectionGlobal()
856 MCContext &Ctx, const GlobalObject *GO, SectionKind Kind, Mangler &Mang, in selectELFSectionForGlobal() argument
860 auto [Group, IsComdat, ExtraFlags] = getGlobalObjectInfo(GO, TM); in selectELFSectionForGlobal()
877 GO, Kind, Mang, TM, EntrySize, UniqueSectionName); in selectELFSectionForGlobal()
888 MCContext &Ctx, const GlobalObject *GO, SectionKind Kind, Mangler &Mang, in selectELFSectionForGlobal() argument
891 const MCSymbolELF *LinkedToSym = getLinkedToSymbol(GO, TM); in selectELFSectionForGlobal()
908 Ctx, GO, Kind, Mang, TM, EmitUniqueSection, Flags, in selectELFSectionForGlobal()
915 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument
927 EmitUniqueSection |= GO->hasComdat(); in SelectSectionForGlobal()
928 return selectELFSectionForGlobal(getContext(), GO, Kind, getMangler(), TM, in SelectSectionForGlobal()
929 Used.count(GO), EmitUniqueSection, Flags, in SelectSectionForGlobal()
1034 // function name. All cold blocks for the same function go to the same in getSectionForMachineBasicBlock()
1285 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument
1287 StringRef SectionName = GO->getSection(); in getExplicitSectionGlobal()
1289 const GlobalVariable *GV = dyn_cast<GlobalVariable>(GO); in getExplicitSectionGlobal()
1308 checkMachOComdat(GO); in getExplicitSectionGlobal()
1313 report_fatal_error("Global variable '" + GO->getName() + in getExplicitSectionGlobal()
1315 GO->getSection() + "': " + toString(std::move(E)) + "."); in getExplicitSectionGlobal()
1332 report_fatal_error("Global variable '" + GO->getName() + in getExplicitSectionGlobal()
1341 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument
1342 checkMachOComdat(GO); in SelectSectionForGlobal()
1349 return GO->isWeakForLinker() ? TextCoalSection : TextSection; in SelectSectionForGlobal()
1353 if (GO->isWeakForLinker()) { in SelectSectionForGlobal()
1363 GO->getDataLayout().getPreferredAlign( in SelectSectionForGlobal()
1364 cast<GlobalVariable>(GO)) < Align(32)) in SelectSectionForGlobal()
1370 if (Kind.isMergeable2ByteCString() && !GO->hasExternalLinkage() && in SelectSectionForGlobal()
1371 GO->getDataLayout().getPreferredAlign( in SelectSectionForGlobal()
1372 cast<GlobalVariable>(GO)) < Align(32)) in SelectSectionForGlobal()
1377 if (GO->hasPrivateLinkage() && Kind.isMergeableConst()) { in SelectSectionForGlobal()
1573 if (auto *GO = GV->getAliaseeObject()) { in getNameWithPrefix() local
1574 SectionKind GOKind = TargetLoweringObjectFile::getKindForGlobal(GO, TM); in getNameWithPrefix()
1575 const MCSection *TheSection = SectionForGlobal(GO, GOKind, TM); in getNameWithPrefix()
1669 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument
1670 StringRef Name = GO->getSection(); in getExplicitSectionGlobal()
1683 if (GO->hasComdat()) { in getExplicitSectionGlobal()
1684 Selection = getSelectionForCOFF(GO); in getExplicitSectionGlobal()
1687 ComdatGV = getComdatGVForCOFF(GO); in getExplicitSectionGlobal()
1689 ComdatGV = GO; in getExplicitSectionGlobal()
1717 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument
1726 if ((EmitUniquedSection && !Kind.isCommon()) || GO->hasComdat()) { in SelectSectionForGlobal()
1732 int Selection = getSelectionForCOFF(GO); in SelectSectionForGlobal()
1736 if (GO->hasComdat()) in SelectSectionForGlobal()
1737 ComdatGV = getComdatGVForCOFF(GO); in SelectSectionForGlobal()
1739 ComdatGV = GO; in SelectSectionForGlobal()
1749 if (const auto *F = dyn_cast<Function>(GO)) in SelectSectionForGlobal()
1763 getMangler().getNameWithPrefix(TmpData, GO, /*CannotUsePrivateLabel=*/true); in SelectSectionForGlobal()
2155 if (auto *GO = dyn_cast<GlobalObject>(GV)) in getModuleMetadata() local
2156 Used.insert(GO); in getModuleMetadata()
2160 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument
2163 if (isa<Function>(GO)) { in getExplicitSectionGlobal()
2164 return SelectSectionForGlobal(GO, Kind, TM); in getExplicitSectionGlobal()
2167 StringRef Name = GO->getSection(); in getExplicitSectionGlobal()
2178 if (const Comdat *C = getWasmComdat(GO)) { in getExplicitSectionGlobal()
2182 unsigned Flags = getWasmSectionFlags(Kind, Used.count(GO)); in getExplicitSectionGlobal()
2190 selectWasmSectionForGlobal(MCContext &Ctx, const GlobalObject *GO, in selectWasmSectionForGlobal() argument
2195 if (const Comdat *C = getWasmComdat(GO)) { in selectWasmSectionForGlobal()
2202 if (const auto *F = dyn_cast<Function>(GO)) { in selectWasmSectionForGlobal()
2210 TM.getNameWithPrefix(Name, GO, Mang, true); in selectWasmSectionForGlobal()
2223 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument
2235 EmitUniqueSection |= GO->hasComdat(); in SelectSectionForGlobal()
2236 bool Retain = Used.count(GO); in SelectSectionForGlobal()
2239 return selectWasmSectionForGlobal(getContext(), GO, Kind, getMangler(), TM, in SelectSectionForGlobal()
2339 // It is inherently ambiguous when the GO represents the address of a in getTargetSymbol()
2340 // function, as the GO could either represent a function descriptor or a in getTargetSymbol()
2343 if (const GlobalObject *GO = dyn_cast<GlobalObject>(GV)) { in getTargetSymbol() local
2344 if (GO->isDeclarationForLinker()) in getTargetSymbol()
2345 return cast<MCSectionXCOFF>(getSectionForExternalReference(GO, TM)) in getTargetSymbol()
2354 SectionKind GOKind = getKindForGlobal(GO, TM); in getTargetSymbol()
2357 getSectionForFunctionDescriptor(cast<Function>(GO), TM)) in getTargetSymbol()
2359 if ((TM.getDataSections() && !GO->hasSection()) || GO->hasCommonLinkage() || in getTargetSymbol()
2361 return cast<MCSectionXCOFF>(SectionForGlobal(GO, GOKind, TM)) in getTargetSymbol()
2370 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument
2371 if (!GO->hasSection()) in getExplicitSectionGlobal()
2374 StringRef SectionName = GO->getSection(); in getExplicitSectionGlobal()
2377 if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GO)) in getExplicitSectionGlobal()
2403 const GlobalObject *GO, const TargetMachine &TM) const { in getSectionForExternalReference() argument
2404 assert(GO->isDeclarationForLinker() && in getSectionForExternalReference()
2408 getNameWithPrefix(Name, GO, TM); in getSectionForExternalReference()
2412 if (GO->getThreadLocalMode() == GlobalVariable::LocalDynamicTLSModel && in getSectionForExternalReference()
2413 GO->hasName() && GO->getName() == "_$TLSML") { in getSectionForExternalReference()
2420 isa<Function>(GO) ? XCOFF::XMC_DS : XCOFF::XMC_UA; in getSectionForExternalReference()
2421 if (GO->isThreadLocal()) in getSectionForExternalReference()
2424 if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GO)) in getSectionForExternalReference()
2428 // Externals go into a csect of type ER. in getSectionForExternalReference()
2435 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument
2437 if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GO)) in SelectSectionForGlobal()
2440 getNameWithPrefix(Name, GO, TM); in SelectSectionForGlobal()
2442 GO->hasCommonLinkage() ? XCOFF::XTY_CM : XCOFF::XTY_SD; in SelectSectionForGlobal()
2448 // Common symbols go into a csect with matching name which will get mapped in SelectSectionForGlobal()
2450 // Zero-initialized local TLS symbols go into a csect with matching name which in SelectSectionForGlobal()
2452 if (Kind.isBSSLocal() || GO->hasCommonLinkage() || Kind.isThreadBSSLocal()) { in SelectSectionForGlobal()
2454 getNameWithPrefix(Name, GO, TM); in SelectSectionForGlobal()
2464 return cast<MCSymbolXCOFF>(getFunctionEntryPointSymbol(GO, TM)) in SelectSectionForGlobal()
2476 getNameWithPrefix(Name, GO, TM); in SelectSectionForGlobal()
2489 getNameWithPrefix(Name, GO, TM); in SelectSectionForGlobal()
2500 getNameWithPrefix(Name, GO, TM); in SelectSectionForGlobal()
2515 getNameWithPrefix(Name, GO, TM); in SelectSectionForGlobal()
2722 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument
2723 return SelectSectionForGlobal(GO, Kind, TM); in getExplicitSectionGlobal()
2733 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument
2734 auto *Symbol = TM.getSymbol(GO); in SelectSectionForGlobal()