Lines Matching refs:GO
302 if (auto *GO = dyn_cast<GlobalObject>(GV)) in getModuleMetadata() local
303 Used.insert(GO); in getModuleMetadata()
579 static const MCSymbolELF *getLinkedToSymbol(const GlobalObject *GO, in getLinkedToSymbol() argument
581 MDNode *MD = GO->getMetadata(LLVMContext::MD_associated); in getLinkedToSymbol()
635 getELFSectionNameForGlobal(const GlobalObject *GO, SectionKind Kind, in getELFSectionNameForGlobal() argument
643 Align Alignment = GO->getParent()->getDataLayout().getPreferredAlign( in getELFSectionNameForGlobal()
644 cast<GlobalVariable>(GO)); in getELFSectionNameForGlobal()
652 Name = getSectionPrefixForGlobal(Kind, TM.isLargeGlobalValue(GO)); in getELFSectionNameForGlobal()
656 if (const auto *F = dyn_cast<Function>(GO)) { in getELFSectionNameForGlobal()
665 TM.getNameWithPrefix(Name, GO, Mang, /*MayAlwaysUsePrivate*/true); in getELFSectionNameForGlobal()
688 calcUniqueIDUpdateFlagsAndSize(const GlobalObject *GO, StringRef SectionName, in calcUniqueIDUpdateFlagsAndSize() argument
701 const bool Associated = GO->getMetadata(LLVMContext::MD_associated); in calcUniqueIDUpdateFlagsAndSize()
751 getELFSectionNameForGlobal(GO, Kind, Mang, TM, EntrySize, false); in calcUniqueIDUpdateFlagsAndSize()
763 getGlobalObjectInfo(const GlobalObject *GO, const TargetMachine &TM) { in getGlobalObjectInfo() argument
767 if (const Comdat *C = getELFComdat(GO)) { in getGlobalObjectInfo()
772 if (TM.isLargeGlobalValue(GO)) in getGlobalObjectInfo()
778 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM, in selectExplicitSectionGlobal() argument
781 StringRef SectionName = GO->getSection(); in selectExplicitSectionGlobal()
786 const GlobalVariable *GV = dyn_cast<GlobalVariable>(GO); in selectExplicitSectionGlobal()
799 const Function *F = dyn_cast<Function>(GO); in selectExplicitSectionGlobal()
808 auto [Group, IsComdat, ExtraFlags] = getGlobalObjectInfo(GO, TM); in selectExplicitSectionGlobal()
813 GO, SectionName, Kind, TM, Ctx, Mang, Flags, EntrySize, NextUniqueID, in selectExplicitSectionGlobal()
816 const MCSymbolELF *LinkedToSym = getLinkedToSymbol(GO, TM); in selectExplicitSectionGlobal()
832 GO->getContext().diagnose(LoweringDiagnosticInfo( in selectExplicitSectionGlobal()
833 "Symbol '" + GO->getName() + "' from module '" + in selectExplicitSectionGlobal()
834 (GO->getParent() ? GO->getParent()->getSourceFileName() : "unknown") + in selectExplicitSectionGlobal()
846 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument
847 return selectExplicitSectionGlobal(GO, Kind, TM, getContext(), getMangler(), in getExplicitSectionGlobal()
848 NextUniqueID, Used.count(GO), in getExplicitSectionGlobal()
853 MCContext &Ctx, const GlobalObject *GO, SectionKind Kind, Mangler &Mang, in selectELFSectionForGlobal() argument
857 auto [Group, IsComdat, ExtraFlags] = getGlobalObjectInfo(GO, TM); in selectELFSectionForGlobal()
874 GO, Kind, Mang, TM, EntrySize, UniqueSectionName); in selectELFSectionForGlobal()
885 MCContext &Ctx, const GlobalObject *GO, SectionKind Kind, Mangler &Mang, in selectELFSectionForGlobal() argument
888 const MCSymbolELF *LinkedToSym = getLinkedToSymbol(GO, TM); in selectELFSectionForGlobal()
905 Ctx, GO, Kind, Mang, TM, EmitUniqueSection, Flags, in selectELFSectionForGlobal()
912 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument
924 EmitUniqueSection |= GO->hasComdat(); in SelectSectionForGlobal()
925 return selectELFSectionForGlobal(getContext(), GO, Kind, getMangler(), TM, in SelectSectionForGlobal()
926 Used.count(GO), EmitUniqueSection, Flags, in SelectSectionForGlobal()
1282 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument
1284 StringRef SectionName = GO->getSection(); in getExplicitSectionGlobal()
1286 const GlobalVariable *GV = dyn_cast<GlobalVariable>(GO); in getExplicitSectionGlobal()
1300 const Function *F = dyn_cast<Function>(GO); in getExplicitSectionGlobal()
1310 checkMachOComdat(GO); in getExplicitSectionGlobal()
1315 report_fatal_error("Global variable '" + GO->getName() + in getExplicitSectionGlobal()
1317 GO->getSection() + "': " + toString(std::move(E)) + "."); in getExplicitSectionGlobal()
1334 report_fatal_error("Global variable '" + GO->getName() + in getExplicitSectionGlobal()
1343 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument
1344 checkMachOComdat(GO); in SelectSectionForGlobal()
1351 return GO->isWeakForLinker() ? TextCoalSection : TextSection; in SelectSectionForGlobal()
1355 if (GO->isWeakForLinker()) { in SelectSectionForGlobal()
1365 GO->getParent()->getDataLayout().getPreferredAlign( in SelectSectionForGlobal()
1366 cast<GlobalVariable>(GO)) < Align(32)) in SelectSectionForGlobal()
1372 if (Kind.isMergeable2ByteCString() && !GO->hasExternalLinkage() && in SelectSectionForGlobal()
1373 GO->getParent()->getDataLayout().getPreferredAlign( in SelectSectionForGlobal()
1374 cast<GlobalVariable>(GO)) < Align(32)) in SelectSectionForGlobal()
1379 if (GO->hasPrivateLinkage() && Kind.isMergeableConst()) { in SelectSectionForGlobal()
1575 if (auto *GO = GV->getAliaseeObject()) { in getNameWithPrefix() local
1576 SectionKind GOKind = TargetLoweringObjectFile::getKindForGlobal(GO, TM); in getNameWithPrefix()
1577 const MCSection *TheSection = SectionForGlobal(GO, GOKind, TM); in getNameWithPrefix()
1671 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument
1672 StringRef Name = GO->getSection(); in getExplicitSectionGlobal()
1685 if (GO->hasComdat()) { in getExplicitSectionGlobal()
1686 Selection = getSelectionForCOFF(GO); in getExplicitSectionGlobal()
1689 ComdatGV = getComdatGVForCOFF(GO); in getExplicitSectionGlobal()
1691 ComdatGV = GO; in getExplicitSectionGlobal()
1719 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument
1728 if ((EmitUniquedSection && !Kind.isCommon()) || GO->hasComdat()) { in SelectSectionForGlobal()
1734 int Selection = getSelectionForCOFF(GO); in SelectSectionForGlobal()
1738 if (GO->hasComdat()) in SelectSectionForGlobal()
1739 ComdatGV = getComdatGVForCOFF(GO); in SelectSectionForGlobal()
1741 ComdatGV = GO; in SelectSectionForGlobal()
1751 if (const auto *F = dyn_cast<Function>(GO)) in SelectSectionForGlobal()
1765 getMangler().getNameWithPrefix(TmpData, GO, /*CannotUsePrivateLabel=*/true); in SelectSectionForGlobal()
2159 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument
2162 if (isa<Function>(GO)) { in getExplicitSectionGlobal()
2163 return SelectSectionForGlobal(GO, Kind, TM); in getExplicitSectionGlobal()
2166 StringRef Name = GO->getSection(); in getExplicitSectionGlobal()
2177 if (const Comdat *C = getWasmComdat(GO)) { in getExplicitSectionGlobal()
2189 MCContext &Ctx, const GlobalObject *GO, SectionKind Kind, Mangler &Mang, in selectWasmSectionForGlobal() argument
2192 if (const Comdat *C = getWasmComdat(GO)) { in selectWasmSectionForGlobal()
2199 if (const auto *F = dyn_cast<Function>(GO)) { in selectWasmSectionForGlobal()
2207 TM.getNameWithPrefix(Name, GO, Mang, true); in selectWasmSectionForGlobal()
2220 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument
2232 EmitUniqueSection |= GO->hasComdat(); in SelectSectionForGlobal()
2234 return selectWasmSectionForGlobal(getContext(), GO, Kind, getMangler(), TM, in SelectSectionForGlobal()
2338 if (const GlobalObject *GO = dyn_cast<GlobalObject>(GV)) { in getTargetSymbol() local
2339 if (GO->isDeclarationForLinker()) in getTargetSymbol()
2340 return cast<MCSectionXCOFF>(getSectionForExternalReference(GO, TM)) in getTargetSymbol()
2349 SectionKind GOKind = getKindForGlobal(GO, TM); in getTargetSymbol()
2352 getSectionForFunctionDescriptor(cast<Function>(GO), TM)) in getTargetSymbol()
2354 if ((TM.getDataSections() && !GO->hasSection()) || GO->hasCommonLinkage() || in getTargetSymbol()
2356 return cast<MCSectionXCOFF>(SectionForGlobal(GO, GOKind, TM)) in getTargetSymbol()
2365 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument
2366 if (!GO->hasSection()) in getExplicitSectionGlobal()
2369 StringRef SectionName = GO->getSection(); in getExplicitSectionGlobal()
2372 if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GO)) in getExplicitSectionGlobal()
2398 const GlobalObject *GO, const TargetMachine &TM) const { in getSectionForExternalReference() argument
2399 assert(GO->isDeclarationForLinker() && in getSectionForExternalReference()
2403 getNameWithPrefix(Name, GO, TM); in getSectionForExternalReference()
2406 isa<Function>(GO) ? XCOFF::XMC_DS : XCOFF::XMC_UA; in getSectionForExternalReference()
2407 if (GO->isThreadLocal()) in getSectionForExternalReference()
2410 if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GO)) in getSectionForExternalReference()
2421 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument
2423 if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GO)) in SelectSectionForGlobal()
2426 getNameWithPrefix(Name, GO, TM); in SelectSectionForGlobal()
2436 if (Kind.isBSSLocal() || GO->hasCommonLinkage() || Kind.isThreadBSSLocal()) { in SelectSectionForGlobal()
2438 getNameWithPrefix(Name, GO, TM); in SelectSectionForGlobal()
2448 return cast<MCSymbolXCOFF>(getFunctionEntryPointSymbol(GO, TM)) in SelectSectionForGlobal()
2460 getNameWithPrefix(Name, GO, TM); in SelectSectionForGlobal()
2473 getNameWithPrefix(Name, GO, TM); in SelectSectionForGlobal()
2484 getNameWithPrefix(Name, GO, TM); in SelectSectionForGlobal()
2499 getNameWithPrefix(Name, GO, TM); in SelectSectionForGlobal()
2689 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument
2690 return SelectSectionForGlobal(GO, Kind, TM); in getExplicitSectionGlobal()
2701 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument
2702 auto *Symbol = TM.getSymbol(GO); in SelectSectionForGlobal()