Lines Matching refs:GO

301     if (auto *GO = dyn_cast<GlobalObject>(GV))  in getModuleMetadata()  local
302 Used.insert(GO); in getModuleMetadata()
554 static const MCSymbolELF *getLinkedToSymbol(const GlobalObject *GO, in getLinkedToSymbol() argument
556 MDNode *MD = GO->getMetadata(LLVMContext::MD_associated); in getLinkedToSymbol()
617 getELFSectionNameForGlobal(const GlobalObject *GO, SectionKind Kind, in getELFSectionNameForGlobal() argument
625 Align Alignment = GO->getParent()->getDataLayout().getPreferredAlign( in getELFSectionNameForGlobal()
626 cast<GlobalVariable>(GO)); in getELFSectionNameForGlobal()
638 if (const auto *F = dyn_cast<Function>(GO)) { in getELFSectionNameForGlobal()
647 TM.getNameWithPrefix(Name, GO, Mang, /*MayAlwaysUsePrivate*/true); in getELFSectionNameForGlobal()
670 calcUniqueIDUpdateFlagsAndSize(const GlobalObject *GO, StringRef SectionName, in calcUniqueIDUpdateFlagsAndSize() argument
683 const bool Associated = GO->getMetadata(LLVMContext::MD_associated); in calcUniqueIDUpdateFlagsAndSize()
733 getELFSectionNameForGlobal(GO, Kind, Mang, TM, EntrySize, false); in calcUniqueIDUpdateFlagsAndSize()
745 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM, in selectExplicitSectionGlobal() argument
748 StringRef SectionName = GO->getSection(); in selectExplicitSectionGlobal()
753 const GlobalVariable *GV = dyn_cast<GlobalVariable>(GO); in selectExplicitSectionGlobal()
766 const Function *F = dyn_cast<Function>(GO); in selectExplicitSectionGlobal()
777 if (const Comdat *C = getELFComdat(GO)) { in selectExplicitSectionGlobal()
785 GO, SectionName, Kind, TM, Ctx, Mang, Flags, EntrySize, NextUniqueID, in selectExplicitSectionGlobal()
788 const MCSymbolELF *LinkedToSym = getLinkedToSymbol(GO, TM); in selectExplicitSectionGlobal()
804 GO->getContext().diagnose(LoweringDiagnosticInfo( in selectExplicitSectionGlobal()
805 "Symbol '" + GO->getName() + "' from module '" + in selectExplicitSectionGlobal()
806 (GO->getParent() ? GO->getParent()->getSourceFileName() : "unknown") + in selectExplicitSectionGlobal()
818 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument
819 return selectExplicitSectionGlobal(GO, Kind, TM, getContext(), getMangler(), in getExplicitSectionGlobal()
820 NextUniqueID, Used.count(GO), in getExplicitSectionGlobal()
825 MCContext &Ctx, const GlobalObject *GO, SectionKind Kind, Mangler &Mang, in selectELFSectionForGlobal() argument
831 if (const Comdat *C = getELFComdat(GO)) { in selectELFSectionForGlobal()
851 GO, Kind, Mang, TM, EntrySize, UniqueSectionName); in selectELFSectionForGlobal()
862 MCContext &Ctx, const GlobalObject *GO, SectionKind Kind, Mangler &Mang, in selectELFSectionForGlobal() argument
865 const MCSymbolELF *LinkedToSym = getLinkedToSymbol(GO, TM); in selectELFSectionForGlobal()
882 Ctx, GO, Kind, Mang, TM, EmitUniqueSection, Flags, in selectELFSectionForGlobal()
889 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument
901 EmitUniqueSection |= GO->hasComdat(); in SelectSectionForGlobal()
902 return selectELFSectionForGlobal(getContext(), GO, Kind, getMangler(), TM, in SelectSectionForGlobal()
903 Used.count(GO), EmitUniqueSection, Flags, in SelectSectionForGlobal()
1247 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument
1249 StringRef SectionName = GO->getSection(); in getExplicitSectionGlobal()
1251 const Function *F = dyn_cast<Function>(GO); in getExplicitSectionGlobal()
1261 checkMachOComdat(GO); in getExplicitSectionGlobal()
1266 report_fatal_error("Global variable '" + GO->getName() + in getExplicitSectionGlobal()
1268 GO->getSection() + "': " + toString(std::move(E)) + "."); in getExplicitSectionGlobal()
1285 report_fatal_error("Global variable '" + GO->getName() + in getExplicitSectionGlobal()
1294 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument
1295 checkMachOComdat(GO); in SelectSectionForGlobal()
1302 return GO->isWeakForLinker() ? TextCoalSection : TextSection; in SelectSectionForGlobal()
1306 if (GO->isWeakForLinker()) { in SelectSectionForGlobal()
1316 GO->getParent()->getDataLayout().getPreferredAlign( in SelectSectionForGlobal()
1317 cast<GlobalVariable>(GO)) < Align(32)) in SelectSectionForGlobal()
1323 if (Kind.isMergeable2ByteCString() && !GO->hasExternalLinkage() && in SelectSectionForGlobal()
1324 GO->getParent()->getDataLayout().getPreferredAlign( in SelectSectionForGlobal()
1325 cast<GlobalVariable>(GO)) < Align(32)) in SelectSectionForGlobal()
1330 if (GO->hasPrivateLinkage() && Kind.isMergeableConst()) { in SelectSectionForGlobal()
1521 if (auto *GO = GV->getAliaseeObject()) { in getNameWithPrefix() local
1522 SectionKind GOKind = TargetLoweringObjectFile::getKindForGlobal(GO, TM); in getNameWithPrefix()
1523 const MCSection *TheSection = SectionForGlobal(GO, GOKind, TM); in getNameWithPrefix()
1617 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument
1620 StringRef Name = GO->getSection(); in getExplicitSectionGlobal()
1622 if (GO->hasComdat()) { in getExplicitSectionGlobal()
1623 Selection = getSelectionForCOFF(GO); in getExplicitSectionGlobal()
1626 ComdatGV = getComdatGVForCOFF(GO); in getExplicitSectionGlobal()
1628 ComdatGV = GO; in getExplicitSectionGlobal()
1656 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument
1665 if ((EmitUniquedSection && !Kind.isCommon()) || GO->hasComdat()) { in SelectSectionForGlobal()
1671 int Selection = getSelectionForCOFF(GO); in SelectSectionForGlobal()
1675 if (GO->hasComdat()) in SelectSectionForGlobal()
1676 ComdatGV = getComdatGVForCOFF(GO); in SelectSectionForGlobal()
1678 ComdatGV = GO; in SelectSectionForGlobal()
1688 if (const auto *F = dyn_cast<Function>(GO)) in SelectSectionForGlobal()
1702 getMangler().getNameWithPrefix(TmpData, GO, /*CannotUsePrivateLabel=*/true); in SelectSectionForGlobal()
2070 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument
2073 if (isa<Function>(GO)) { in getExplicitSectionGlobal()
2074 return SelectSectionForGlobal(GO, Kind, TM); in getExplicitSectionGlobal()
2077 StringRef Name = GO->getSection(); in getExplicitSectionGlobal()
2088 if (const Comdat *C = getWasmComdat(GO)) { in getExplicitSectionGlobal()
2100 MCContext &Ctx, const GlobalObject *GO, SectionKind Kind, Mangler &Mang, in selectWasmSectionForGlobal() argument
2103 if (const Comdat *C = getWasmComdat(GO)) { in selectWasmSectionForGlobal()
2110 if (const auto *F = dyn_cast<Function>(GO)) { in selectWasmSectionForGlobal()
2118 TM.getNameWithPrefix(Name, GO, Mang, true); in selectWasmSectionForGlobal()
2131 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument
2143 EmitUniqueSection |= GO->hasComdat(); in SelectSectionForGlobal()
2145 return selectWasmSectionForGlobal(getContext(), GO, Kind, getMangler(), TM, in SelectSectionForGlobal()
2247 if (const GlobalObject *GO = dyn_cast<GlobalObject>(GV)) { in getTargetSymbol() local
2254 if (GO->isDeclarationForLinker()) in getTargetSymbol()
2255 return cast<MCSectionXCOFF>(getSectionForExternalReference(GO, TM)) in getTargetSymbol()
2258 SectionKind GOKind = getKindForGlobal(GO, TM); in getTargetSymbol()
2261 getSectionForFunctionDescriptor(cast<Function>(GO), TM)) in getTargetSymbol()
2263 if ((TM.getDataSections() && !GO->hasSection()) || GO->hasCommonLinkage() || in getTargetSymbol()
2265 return cast<MCSectionXCOFF>(SectionForGlobal(GO, GOKind, TM)) in getTargetSymbol()
2274 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument
2275 if (!GO->hasSection()) in getExplicitSectionGlobal()
2278 StringRef SectionName = GO->getSection(); in getExplicitSectionGlobal()
2281 if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GO)) in getExplicitSectionGlobal()
2304 const GlobalObject *GO, const TargetMachine &TM) const { in getSectionForExternalReference() argument
2305 assert(GO->isDeclarationForLinker() && in getSectionForExternalReference()
2309 getNameWithPrefix(Name, GO, TM); in getSectionForExternalReference()
2312 isa<Function>(GO) ? XCOFF::XMC_DS : XCOFF::XMC_UA; in getSectionForExternalReference()
2313 if (GO->isThreadLocal()) in getSectionForExternalReference()
2323 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument
2325 if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GO)) in SelectSectionForGlobal()
2328 getNameWithPrefix(Name, GO, TM); in SelectSectionForGlobal()
2338 if (Kind.isBSSLocal() || GO->hasCommonLinkage() || Kind.isThreadBSSLocal()) { in SelectSectionForGlobal()
2340 getNameWithPrefix(Name, GO, TM); in SelectSectionForGlobal()
2349 Align Alignment = GO->getParent()->getDataLayout().getPreferredAlign( in SelectSectionForGlobal()
2350 cast<GlobalVariable>(GO)); in SelectSectionForGlobal()
2358 getNameWithPrefix(Name, GO, TM); in SelectSectionForGlobal()
2367 return cast<MCSymbolXCOFF>(getFunctionEntryPointSymbol(GO, TM)) in SelectSectionForGlobal()
2383 getNameWithPrefix(Name, GO, TM); in SelectSectionForGlobal()
2394 getNameWithPrefix(Name, GO, TM); in SelectSectionForGlobal()
2409 getNameWithPrefix(Name, GO, TM); in SelectSectionForGlobal()
2588 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument
2589 return SelectSectionForGlobal(GO, Kind, TM); in getExplicitSectionGlobal()
2593 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument
2594 auto *Symbol = TM.getSymbol(GO); in SelectSectionForGlobal()