| /freebsd/contrib/llvm-project/llvm/lib/Target/NVPTX/ |
| H A D | NVPTXAsmPrinter.cpp | 806 if (const auto *GVar = dyn_cast<GlobalVariable>(V)) in emitLinkageDirective() local 807 O << (GVar->hasInitializer() ? ".visible " : ".extern "); in emitLinkageDirective() 821 void NVPTXAsmPrinter::printModuleLevelGV(const GlobalVariable *GVar, in printModuleLevelGV() argument 825 if (GVar->hasSection()) in printModuleLevelGV() 826 if (GVar->getSection() == "llvm.metadata") in printModuleLevelGV() 830 if (GVar->getName().starts_with("llvm.") || in printModuleLevelGV() 831 GVar->getName().starts_with("nvvm.")) in printModuleLevelGV() 837 Type *ETy = GVar->getValueType(); in printModuleLevelGV() 839 if (GVar->hasExternalLinkage()) { in printModuleLevelGV() 840 if (GVar->hasInitializer()) in printModuleLevelGV() [all …]
|
| H A D | NVPTXAsmPrinter.h | 133 void addSymbol(const Value *GVar, const Value *GVarBeforeStripping) { in addSymbol() argument 135 Symbols.push_back(GVar); in addSymbol() 171 void printModuleLevelGV(const GlobalVariable *GVar, raw_ostream &O, 212 void emitPTXGlobalVariable(const GlobalVariable *GVar, raw_ostream &O,
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/ |
| H A D | TargetLoweringObjectFile.cpp | 241 const auto *GVar = cast<GlobalVariable>(GO); in getKindForGlobal() local 244 if (GVar->isThreadLocal()) { in getKindForGlobal() 245 if (isSuitableForBSS(GVar) && !TM.Options.NoZerosInBSS) { in getKindForGlobal() 248 if (GVar->hasLocalLinkage()) { in getKindForGlobal() 257 if (GVar->hasCommonLinkage()) in getKindForGlobal() 262 if (isSuitableForBSS(GVar) && !TM.Options.NoZerosInBSS) { in getKindForGlobal() 263 if (GVar->hasLocalLinkage()) in getKindForGlobal() 265 else if (GVar->hasExternalLinkage()) in getKindForGlobal() 272 if (GVar->hasSection()) in getKindForGlobal() 273 if (MDNode *MD = GVar->getMetadata(LLVMContext::MD_exclude)) in getKindForGlobal() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/IR/ |
| H A D | StructuralHash.cpp | 80 static stable_hash hashGlobalVariable(const GlobalVariable &GVar) { in hashGlobalVariable() argument 81 if (!GVar.hasInitializer()) in hashGlobalVariable() 82 return hashGlobalValue(&GVar); in hashGlobalVariable() 85 if (GVar.getName().starts_with(".str")) { in hashGlobalVariable() 86 auto *C = GVar.getInitializer(); in hashGlobalVariable() 98 if (GVar.hasSection()) { in hashGlobalVariable() 99 StringRef SectionName = GVar.getSection(); in hashGlobalVariable() 102 return hashConstant(GVar.getInitializer()); in hashGlobalVariable() 105 return hashGlobalValue(&GVar); in hashGlobalVariable() 129 if (auto *GVar = dyn_cast<GlobalVariable>(C)) { in hashConstant() local [all …]
|
| H A D | Value.cpp | 969 } else if (auto *GVar = dyn_cast<GlobalVariable>(this)) { in getPointerAlignment() local 970 const MaybeAlign Alignment(GVar->getAlign()); in getPointerAlignment() 972 Type *ObjectType = GVar->getValueType(); in getPointerAlignment() 977 if (GVar->isStrongDefinitionForLinker()) in getPointerAlignment() 978 return DL.getPreferredAlign(GVar); in getPointerAlignment()
|
| H A D | ConstantFold.cpp | 967 if (const auto *GVar = dyn_cast<GlobalVariable>(GV)) { in areGlobalsPotentiallyEqual() local 968 Type *Ty = GVar->getValueType(); in areGlobalsPotentiallyEqual()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/ |
| H A D | HexagonTargetObjectFile.cpp | 207 const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GO); in isGlobalInSmallSection() local 208 if (!GVar) { in isGlobalInSmallSection() 216 if (GVar->hasSection()) { in isGlobalInSmallSection() 217 bool IsSmall = isSmallDataSection(GVar->getSection()); in isGlobalInSmallSection() 219 << ", has section: " << GVar->getSection() << '\n'); in isGlobalInSmallSection() 229 if (GVar->isConstant()) { in isGlobalInSmallSection() 234 bool IsLocal = GVar->hasLocalLinkage(); in isGlobalInSmallSection() 240 Type *GType = GVar->getValueType(); in isGlobalInSmallSection() 257 unsigned Size = GVar->getDataLayout().getTypeAllocSize(GType); in isGlobalInSmallSection() 398 const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GO); in selectSmallSectionForGlobal() local [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/ |
| H A D | PPCTargetObjectFile.cpp | 40 const auto *GVar = dyn_cast<GlobalVariable>(GO); in SelectSectionForGlobal() local 42 if (GVar && GVar->isConstant() && in SelectSectionForGlobal() 43 GVar->getInitializer()->needsDynamicRelocation()) in SelectSectionForGlobal()
|
| H A D | PPCSubtarget.cpp | 194 if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV)) in isGVIndirectSymbol() local 196 return !GVar->hasAttribute("toc-data"); in isGVIndirectSymbol()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/BPF/ |
| H A D | BTFDebug.cpp | 1377 const GlobalVariable *GVar, bool IsAma) { in generatePatchImmReloc() argument 1382 StringRef AccessPattern = GVar->getName(); in generatePatchImmReloc() 1395 PatchImms[GVar] = std::make_pair(std::stoll(std::string(PatchImmStr)), in generatePatchImmReloc() 1401 PatchImms[GVar] = std::make_pair(RootId, FieldReloc.RelocKind); in generatePatchImmReloc() 1410 auto *GVar = dyn_cast<GlobalVariable>(GVal); in processGlobalValue() local 1411 if (!GVar) { in processGlobalValue() 1417 if (!GVar->hasAttribute(BPFCoreSharedInfo::AmaAttr) && in processGlobalValue() 1418 !GVar->hasAttribute(BPFCoreSharedInfo::TypeIdAttr)) in processGlobalValue() 1424 MDNode *MDN = GVar->getMetadata(LLVMContext::MD_preserve_access_index); in processGlobalValue() 1426 generatePatchImmReloc(ORSym, RootId, GVar, in processGlobalValue() [all …]
|
| H A D | BPFMISimplifyPatchable.cpp | 347 auto *GVar = dyn_cast<GlobalVariable>(GVal); in removeLD() local 348 if (!GVar) in removeLD() 353 if (GVar->hasAttribute(BPFCoreSharedInfo::AmaAttr)) in removeLD() 355 else if (!GVar->hasAttribute(BPFCoreSharedInfo::TypeIdAttr)) in removeLD()
|
| /freebsd/contrib/llvm-project/llvm/lib/Object/ |
| H A D | IRSymtab.cpp | 298 auto *GVar = dyn_cast<GlobalVariable>(GV); in addSymbol() local 299 if (!GVar) in addSymbol() 304 Uncommon().CommonAlign = GVar->getAlign() ? GVar->getAlign()->value() : 0; in addSymbol()
|
| H A D | ModuleSymbolTable.cpp | 224 if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV)) { in getSymbolFlags() local 225 if (GVar->isConstant()) in getSymbolFlags()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/SPIRV/ |
| H A D | SPIRVGlobalRegistry.cpp | 706 const GlobalVariable *GVar = nullptr; in buildGlobalVariable() local 708 GVar = cast<const GlobalVariable>(GV); in buildGlobalVariable() 713 GVar = M->getGlobalVariable(Name); in buildGlobalVariable() 714 if (GVar == nullptr) { in buildGlobalVariable() 717 GVar = new GlobalVariable(*M, const_cast<Type *>(Ty), false, in buildGlobalVariable() 721 GV = GVar; in buildGlobalVariable() 725 Register Reg = find(GVar, MF); in buildGlobalVariable() 746 add(GVar, MIB); in buildGlobalVariable() 749 addGlobalObject(GVar, MF, Reg); in buildGlobalVariable() 768 if (GVar && GVar->hasName()) in buildGlobalVariable() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/IPO/ |
| H A D | ThinLTOBitcodeWriter.cpp | 369 if (auto *GVar = in splitAndWriteThinLTOBitcode() local 371 return HasTypeMetadata(GVar); in splitAndWriteThinLTOBitcode() 399 if (auto *GVar = dyn_cast_or_null<GlobalVariable>(GV->getAliaseeObject())) in splitAndWriteThinLTOBitcode() local 400 if (HasTypeMetadata(GVar)) in splitAndWriteThinLTOBitcode()
|
| H A D | GlobalOpt.cpp | 1671 auto *GVar = dyn_cast<GlobalVariable>(&GV); in processGlobal() local 1672 if (!GVar) in processGlobal() 1675 if (GVar->isConstant() || !GVar->hasInitializer()) in processGlobal() 1678 return processInternalGlobal(GVar, GS, GetTTI, GetTLI, LookupDomTree) || in processGlobal()
|
| H A D | WholeProgramDevirt.cpp | 937 auto *GVar = dyn_cast<GlobalVarSummary>(S.get()); in updateVCallVisibilityInIndex() local 938 if (!GVar || in updateVCallVisibilityInIndex() 939 GVar->getVCallVisibility() != GlobalObject::VCallVisibilityPublic) in updateVCallVisibilityInIndex() 947 GVar->setVCallVisibility(GlobalObject::VCallVisibilityLinkageUnit); in updateVCallVisibilityInIndex()
|
| /freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
| H A D | MachineStableHash.cpp | 99 if (auto *GVar = dyn_cast<GlobalVariable>(GV)) in stableHashValue() local 100 GVHash = StructuralHash(*GVar); in stableHashValue()
|
| H A D | TargetLoweringObjectFileImpl.cpp | 2395 if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV)) in getTargetSymbol() local 2396 if (GVar->hasAttribute("toc-data")) in getTargetSymbol() 2398 SectionForGlobal(GVar, SectionKind::getData(), TM)) in getTargetSymbol() 2424 if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GO)) in getExplicitSectionGlobal() local 2425 if (GVar->hasAttribute("toc-data")) in getExplicitSectionGlobal() 2471 if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GO)) in getSectionForExternalReference() local 2472 if (GVar->hasAttribute("toc-data")) in getSectionForExternalReference() 2484 if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GO)) in SelectSectionForGlobal() local 2485 if (GVar->hasAttribute("toc-data")) { in SelectSectionForGlobal()
|
| /freebsd/contrib/llvm-project/llvm/lib/Linker/ |
| H A D | LinkModules.cpp | 66 const GlobalVariable *&GVar); 132 const GlobalVariable *&GVar) { in getComdatLeader() argument 142 GVar = dyn_cast_or_null<GlobalVariable>(GVal); in getComdatLeader() 143 if (!GVar) in getComdatLeader()
|
| /freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
| H A D | GlobalsModRef.cpp | 746 auto *GVar = dyn_cast<GlobalVariable>(GV); in isNonEscapingGlobalNoAlias() local 748 if (GVar && InputGVar && in isNonEscapingGlobalNoAlias() 749 !GVar->isDeclaration() && !InputGVar->isDeclaration() && in isNonEscapingGlobalNoAlias() 750 !GVar->isInterposable() && !InputGVar->isInterposable()) { in isNonEscapingGlobalNoAlias() 751 Type *GVType = GVar->getInitializer()->getType(); in isNonEscapingGlobalNoAlias()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/ARM/ |
| H A D | ARMConstantPoolValue.cpp | 154 ARMConstantPoolConstant::Create(const GlobalVariable *GVar, in Create() argument 156 return new ARMConstantPoolConstant(GVar, Initializer); in Create()
|
| /freebsd/contrib/llvm-project/clang/lib/CodeGen/Targets/ |
| H A D | PPC.cpp | 278 auto *GVar = cast<llvm::GlobalVariable>(GV); in setTargetAttributes() local 324 GVar->addAttribute("toc-data"); in setTargetAttributes()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/Mips/ |
| H A D | MipsFastISel.cpp | 410 const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV); in materializeGV() local 411 bool IsThreadLocal = GVar && GVar->isThreadLocal(); in materializeGV()
|
| /freebsd/contrib/llvm-project/llvm/lib/ExecutionEngine/ |
| H A D | ExecutionEngine.cpp | 573 if (GlobalVariable *GVar = in getPointerToGlobal() local 575 emitGlobalVariable(GVar); in getPointerToGlobal()
|