| /llvm-project-15.0.7/llvm/lib/Target/Hexagon/ |
| H A D | HexagonTargetObjectFile.cpp | 144 if (const Function *Fn = getLutUsedFunction(GO)) in SelectSectionForGlobal() 145 return selectSectionForLookupTable(GO, TM, Fn); in SelectSectionForGlobal() 148 if (isGlobalInSmallSection(GO, TM)) in SelectSectionForGlobal() 167 << GO->getSection() << ") "); in getExplicitSectionGlobal() 178 if (GO->hasSection()) { in getExplicitSectionGlobal() 179 StringRef Section = GO->getSection(); in getExplicitSectionGlobal() 188 if (isGlobalInSmallSection(GO, TM)) in getExplicitSectionGlobal() 344 const Type *GTy = GO->getValueType(); in selectSmallSectionForGlobal() 371 Name.append(GO->getName()); in selectSmallSectionForGlobal() 415 Name.append(GO->getName()); in selectSmallSectionForGlobal() [all …]
|
| H A D | HexagonTargetObjectFile.h | 22 MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, 25 MCSection *getExplicitSectionGlobal(const GlobalObject *GO, 29 bool isGlobalInSmallSection(const GlobalObject *GO, 39 const Function *getLutUsedFunction(const GlobalObject *GO) const; 48 MCSection *selectSmallSectionForGlobal(const GlobalObject *GO, 52 MCSection *selectSectionForLookupTable(const GlobalObject *GO,
|
| /llvm-project-15.0.7/llvm/lib/Target/Lanai/ |
| H A D | LanaiTargetObjectFile.cpp | 50 const GlobalObject *GO, const TargetMachine &TM) const { in isGlobalInSmallSection() argument 51 if (GO == nullptr) return TM.getCodeModel() == CodeModel::Small; in isGlobalInSmallSection() 56 if (GO->isDeclaration() || GO->hasAvailableExternallyLinkage()) in isGlobalInSmallSection() 57 return isGlobalInSmallSectionImpl(GO, TM); in isGlobalInSmallSection() 59 return isGlobalInSmallSection(GO, TM, getKindForGlobal(GO, TM)); in isGlobalInSmallSection() 64 bool LanaiTargetObjectFile::isGlobalInSmallSection(const GlobalObject *GO, in isGlobalInSmallSection() argument 67 return isGlobalInSmallSectionImpl(GO, TM); in isGlobalInSmallSection() 74 const GlobalObject *GO, const TargetMachine &TM) const { in isGlobalInSmallSectionImpl() argument 75 const auto *GVA = dyn_cast<GlobalVariable>(GO); in isGlobalInSmallSectionImpl() 104 if (Kind.isBSS() && isGlobalInSmallSection(GO, TM, Kind)) in SelectSectionForGlobal() [all …]
|
| H A D | LanaiTargetObjectFile.h | 19 bool isGlobalInSmallSection(const GlobalObject *GO, const TargetMachine &TM, 21 bool isGlobalInSmallSectionImpl(const GlobalObject *GO, 29 bool isGlobalInSmallSection(const GlobalObject *GO, 32 MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind,
|
| /llvm-project-15.0.7/llvm/tools/llvm-reduce/deltas/ |
| H A D | ReduceGlobalObjects.cpp | 14 static bool shouldReduceSection(GlobalObject &GO) { return GO.hasSection(); } in shouldReduceSection() argument 16 static bool shouldReduceAlign(GlobalObject &GO) { in shouldReduceAlign() argument 17 return GO.getAlign().has_value(); in shouldReduceAlign() 21 for (auto &GO : Program.global_objects()) { in reduceGOs() local 22 if (shouldReduceSection(GO) && !O.shouldKeep()) in reduceGOs() 23 GO.setSection(""); in reduceGOs() 24 if (shouldReduceAlign(GO) && !O.shouldKeep()) in reduceGOs() 25 GO.setAlignment(MaybeAlign()); in reduceGOs()
|
| /llvm-project-15.0.7/llvm/lib/Target/Mips/ |
| H A D | MipsTargetObjectFile.cpp | 70 const GlobalObject *GO, const TargetMachine &TM) const { in IsGlobalInSmallSection() argument 74 if (GO->isDeclaration() || GO->hasAvailableExternallyLinkage()) in IsGlobalInSmallSection() 75 return IsGlobalInSmallSectionImpl(GO, TM); in IsGlobalInSmallSection() 77 return IsGlobalInSmallSection(GO, TM, getKindForGlobal(GO, TM)); in IsGlobalInSmallSection() 83 IsGlobalInSmallSection(const GlobalObject *GO, const TargetMachine &TM, in IsGlobalInSmallSection() argument 85 return IsGlobalInSmallSectionImpl(GO, TM) && in IsGlobalInSmallSection() 94 IsGlobalInSmallSectionImpl(const GlobalObject *GO, in IsGlobalInSmallSectionImpl() argument 104 const GlobalVariable *GVA = dyn_cast<GlobalVariable>(GO); in IsGlobalInSmallSectionImpl() 155 if (Kind.isBSS() && IsGlobalInSmallSection(GO, TM, Kind)) in SelectSectionForGlobal() 157 if (Kind.isData() && IsGlobalInSmallSection(GO, TM, Kind)) in SelectSectionForGlobal() [all …]
|
| H A D | MipsTargetObjectFile.h | 21 bool IsGlobalInSmallSection(const GlobalObject *GO, const TargetMachine &TM, 23 bool IsGlobalInSmallSectionImpl(const GlobalObject *GO, 31 bool IsGlobalInSmallSection(const GlobalObject *GO, 34 MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind,
|
| /llvm-project-15.0.7/llvm/lib/CodeGen/ |
| H A D | TargetLoweringObjectFileImpl.cpp | 302 Used.insert(GO); in getModuleMetadata() 806 (GO->getParent() ? GO->getParent()->getSourceFileName() : "unknown") + in selectExplicitSectionGlobal() 1261 checkMachOComdat(GO); in getExplicitSectionGlobal() 1295 checkMachOComdat(GO); in SelectSectionForGlobal() 1622 if (GO->hasComdat()) { in getExplicitSectionGlobal() 1628 ComdatGV = GO; in getExplicitSectionGlobal() 1675 if (GO->hasComdat()) in SelectSectionForGlobal() 1678 ComdatGV = GO; in SelectSectionForGlobal() 2073 if (isa<Function>(GO)) { in getExplicitSectionGlobal() 2263 if ((TM.getDataSections() && !GO->hasSection()) || GO->hasCommonLinkage() || in getTargetSymbol() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Target/AMDGPU/ |
| H A D | AMDGPUTargetObjectFile.cpp | 21 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument 22 if (Kind.isReadOnly() && AMDGPU::isReadOnlySegment(GO) && in SelectSectionForGlobal() 26 return TargetLoweringObjectFileELF::SelectSectionForGlobal(GO, Kind, TM); in SelectSectionForGlobal() 30 const GlobalObject *GO, SectionKind SK, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument 32 StringRef SectionName = GO->getSection(); in getExplicitSectionGlobal() 36 return TargetLoweringObjectFileELF::getExplicitSectionGlobal(GO, SK, TM); in getExplicitSectionGlobal()
|
| H A D | AMDGPUTargetObjectFile.h | 24 MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, 26 MCSection *getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind,
|
| /llvm-project-15.0.7/llvm/lib/Target/ARM/ |
| H A D | ARMTargetObjectFile.cpp | 84 static bool isExecuteOnlyFunction(const GlobalObject *GO, SectionKind SK, in isExecuteOnlyFunction() argument 86 if (const Function *F = dyn_cast<Function>(GO)) in isExecuteOnlyFunction() 93 const GlobalObject *GO, SectionKind SK, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument 95 if (isExecuteOnlyFunction(GO, SK, TM)) in getExplicitSectionGlobal() 98 return TargetLoweringObjectFileELF::getExplicitSectionGlobal(GO, SK, TM); in getExplicitSectionGlobal() 102 const GlobalObject *GO, SectionKind SK, const TargetMachine &TM) const { in SelectSectionForGlobal() argument 104 if (isExecuteOnlyFunction(GO, SK, TM)) in SelectSectionForGlobal() 107 return TargetLoweringObjectFileELF::SelectSectionForGlobal(GO, SK, TM); in SelectSectionForGlobal()
|
| /llvm-project-15.0.7/llvm/lib/Target/AVR/ |
| H A D | AVRTargetObjectFile.cpp | 39 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument 43 if (AVR::isProgramMemoryAddress(GO) && !GO->hasSection() && in SelectSectionForGlobal() 51 return Base::SelectSectionForGlobal(GO, Kind, TM); in SelectSectionForGlobal() 56 AVR::getAddressSpace(GO) != AVR::ProgramMemory) { in SelectSectionForGlobal() 63 switch (AVR::getAddressSpace(GO)) { in SelectSectionForGlobal() 82 return Base::SelectSectionForGlobal(GO, Kind, TM); in SelectSectionForGlobal()
|
| /llvm-project-15.0.7/llvm/lib/Target/ |
| H A D | TargetLoweringObjectFile.cpp | 202 assert(!GO->isDeclarationForLinker() && in getKindForGlobal() 206 if (isa<Function>(GO)) in getKindForGlobal() 210 if (isa<BasicBlock>(GO)) in getKindForGlobal() 214 const auto *GVar = cast<GlobalVariable>(GO); in getKindForGlobal() 324 if (GO->hasSection()) in SectionForGlobal() 325 return getExplicitSectionGlobal(GO, Kind, TM); in SectionForGlobal() 327 if (auto *GVar = dyn_cast<GlobalVariable>(GO)) { in SectionForGlobal() 337 if (auto *F = dyn_cast<Function>(GO)) { in SectionForGlobal() 339 return getExplicitSectionGlobal(GO, Kind, TM); in SectionForGlobal() 343 return SelectSectionForGlobal(GO, Kind, TM); in SectionForGlobal() [all …]
|
| /llvm-project-15.0.7/llvm/include/llvm/CodeGen/ |
| H A D | TargetLoweringObjectFileImpl.h | 63 MCSection *getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind, 66 MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, 128 MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, 131 MCSection *getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind, 169 MCSection *getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind, 172 MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, 210 MCSection *getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind, 213 MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, 257 MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, 280 getSectionForExternalReference(const GlobalObject *GO, [all …]
|
| /llvm-project-15.0.7/llvm/lib/Target/RISCV/ |
| H A D | RISCVTargetObjectFile.cpp | 39 const GlobalObject *GO, const TargetMachine &TM) const { in isGlobalInSmallSection() argument 41 const GlobalVariable *GVA = dyn_cast<GlobalVariable>(GO); in isGlobalInSmallSection() 75 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument 77 if (Kind.isBSS() && isGlobalInSmallSection(GO, TM)) in SelectSectionForGlobal() 79 if (Kind.isData() && isGlobalInSmallSection(GO, TM)) in SelectSectionForGlobal() 83 return TargetLoweringObjectFileELF::SelectSectionForGlobal(GO, Kind, TM); in SelectSectionForGlobal()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Utils/ |
| H A D | FunctionImportUtils.cpp | 300 auto *GO = dyn_cast<GlobalObject>(&GV); in processGlobalForThinLTO() local 301 if (GO && GO->isDeclarationForLinker() && GO->hasComdat()) { in processGlobalForThinLTO() 305 assert(GO->hasAvailableExternallyLinkage() && in processGlobalForThinLTO() 307 GO->setComdat(nullptr); in processGlobalForThinLTO() 322 for (auto &GO : M.global_objects()) in processGlobalsForThinLTO() local 323 if (auto *C = GO.getComdat()) { in processGlobalsForThinLTO() 326 GO.setComdat(Replacement->second); in processGlobalsForThinLTO()
|
| /llvm-project-15.0.7/llvm/lib/IR/ |
| H A D | Globals.cpp | 174 if (const GlobalObject *GO = GA->getAliaseeObject()) in getSection() local 175 return GO->getSection(); in getSection() 184 if (const GlobalObject *GO = GA->getAliaseeObject()) in getComdat() local 185 return const_cast<GlobalObject *>(GO)->getComdat(); in getComdat() 323 if (auto *GO = dyn_cast<GlobalObject>(C)) { in findBaseObject() local 324 Op(*GO); in findBaseObject() 325 return GO; in findBaseObject() 364 auto *GO = dyn_cast<GlobalObject>(this); in isAbsoluteSymbolRef() local 365 if (!GO) in isAbsoluteSymbolRef() 372 auto *GO = dyn_cast<GlobalObject>(this); in getAbsoluteSymbolRange() local [all …]
|
| H A D | Comdat.cpp | 30 void Comdat::addUser(GlobalObject *GO) { Users.insert(GO); } in addUser() argument 32 void Comdat::removeUser(GlobalObject *GO) { Users.erase(GO); } in removeUser() argument
|
| /llvm-project-15.0.7/llvm/lib/Target/XCore/ |
| H A D | XCoreTargetObjectFile.cpp | 98 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in getExplicitSectionGlobal() argument 99 StringRef SectionName = GO->getSection(); in getExplicitSectionGlobal() 109 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument 111 bool UseCPRel = GO->hasLocalLinkage(); in SelectSectionForGlobal() 120 Type *ObjType = GO->getValueType(); in SelectSectionForGlobal() 121 auto &DL = GO->getParent()->getDataLayout(); in SelectSectionForGlobal()
|
| /llvm-project-15.0.7/llvm/include/llvm/Target/ |
| H A D | TargetLoweringObjectFile.h | 113 static SectionKind getKindForGlobal(const GlobalObject *GO, 119 MCSection *SectionForGlobal(const GlobalObject *GO, SectionKind Kind, 125 MCSection *SectionForGlobal(const GlobalObject *GO, 146 getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind, 267 getSectionForExternalReference(const GlobalObject *GO, in getSectionForExternalReference() argument 288 virtual MCSection *SelectSectionForGlobal(const GlobalObject *GO,
|
| /llvm-project-15.0.7/llvm/lib/Transforms/IPO/ |
| H A D | ThinLTOBitcodeWriter.cpp | 96 for (auto &GO : ExportM.global_objects()) in promoteInternals() local 97 if (auto *C = GO.getComdat()) { in promoteInternals() 100 GO.setComdat(Replacement->second); in promoteInternals() 151 for (GlobalObject &GO : M.global_objects()) { in promoteTypeIds() 153 GO.getMetadata(LLVMContext::MD_type, MDs); in promoteTypeIds() 155 GO.eraseMetadata(LLVMContext::MD_type); in promoteTypeIds() 159 GO.addMetadata(LLVMContext::MD_type, *MD); in promoteTypeIds() 162 GO.addMetadata( in promoteTypeIds() 287 return GO->hasMetadata(LLVMContext::MD_type); in splitAndWriteThinLTOBitcode() 499 for (auto &GO : M.global_objects()) { in hasTypeMetadata() local [all …]
|
| H A D | GlobalDCE.cpp | 195 if (auto GO = dyn_cast<GlobalObject>(&GV)) { in ScanVTables() local 196 GlobalObject::VCallVisibility TypeVis = GO->getVCallVisibility(); in ScanVTables() 322 for (GlobalObject &GO : M.global_objects()) { in run() 323 GO.removeDeadConstantUsers(); in run() 327 if (!GO.isDeclaration()) in run() 328 if (!GO.isDiscardableIfUnused()) in run() 329 MarkLive(GO); in run() 331 UpdateGVDependencies(GO); in run()
|
| /llvm-project-15.0.7/llvm/lib/Target/PowerPC/ |
| H A D | PPCTargetObjectFile.cpp | 25 const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { in SelectSectionForGlobal() argument 41 const auto *GVar = dyn_cast<GlobalVariable>(GO); in SelectSectionForGlobal() 48 return TargetLoweringObjectFileELF::SelectSectionForGlobal(GO, Kind, TM); in SelectSectionForGlobal()
|
| /llvm-project-15.0.7/llvm/lib/Target/NVPTX/ |
| H A D | NVPTXTargetObjectFile.h | 34 MCSection *getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind, in getExplicitSectionGlobal() argument 39 MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind,
|
| /llvm-project-15.0.7/llvm/lib/Target/SPIRV/ |
| H A D | SPIRVTargetObjectFile.h | 33 MCSection *getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind, in getExplicitSectionGlobal() argument 37 MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, in SelectSectionForGlobal() argument
|