/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
H A D | FunctionImportUtils.cpp | 30 const GlobalValue *SGV) { in doImportAsDefinition() 35 if (!GlobalsToImport->count(const_cast<GlobalValue *>(SGV))) in doImportAsDefinition() 46 const GlobalValue *SGV, ValueInfo VI) { in shouldPromoteLocalToGlobal() 61 assert((!GlobalsToImport->count(const_cast<GlobalValue *>(SGV)) || in shouldPromoteLocalToGlobal() 81 if (!GlobalValue::isLocalLinkage(Linkage)) { in shouldPromoteLocalToGlobal() 92 const GlobalValue &GV) const { in isNonRenamableLocal() 98 if (Used.count(const_cast<GlobalValue *>(&GV))) in isNonRenamableLocal() 105 FunctionImportGlobalProcessing::getPromotedName(const GlobalValue *SGV) { in getPromotedName() 125 GlobalValue::LinkageTypes 126 FunctionImportGlobalProcessing::getLinkage(const GlobalValue *SGV, in getLinkage() [all …]
|
H A D | SplitModule.cpp | 54 using ClusterMapType = EquivalenceClasses<const GlobalValue *>; 55 using ComdatMembersType = DenseMap<const Comdat *, const GlobalValue *>; 56 using ClusterIDMapType = DenseMap<const GlobalValue *, unsigned>; 73 const GlobalValue *GV, const User *U) { in addNonConstUser() 74 assert((!isa<Constant>(U) || isa<GlobalValue>(U)) && "Bad user"); in addNonConstUser() 77 const GlobalValue *F = I->getParent()->getParent(); in addNonConstUser() 79 } else if (const GlobalValue *GVU = dyn_cast<GlobalValue>(U)) { in addNonConstUser() 88 const GlobalValue *GV, const Value *V) { in addAllGlobalValueUsers() 95 if (isa<Constant>(UU) && !isa<GlobalValue>(UU)) { in addAllGlobalValueUsers() 104 static const GlobalObject *getGVPartitioningRoot(const GlobalValue *GV) { in getGVPartitioningRoot() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/IR/ |
H A D | Globals.cpp | 35 static_assert(sizeof(GlobalValue) == 40 static_assert(sizeof(GlobalObject) == sizeof(GlobalValue) + sizeof(void *), 43 bool GlobalValue::isMaterializable() const { in isMaterializable() 48 Error GlobalValue::materialize() { return getParent()->materialize(this); } in materialize() 52 void GlobalValue::destroyConstantImpl() { in destroyConstantImpl() 56 Value *GlobalValue::handleOperandChangeImpl(Value *From, Value *To) { in handleOperandChangeImpl() 62 void GlobalValue::copyAttributesFrom(const GlobalValue *Src) { in copyAttributesFrom() 75 GlobalValue::GUID GlobalValue::getGUID(StringRef GlobalName) { in getGUID() 79 void GlobalValue::removeFromParent() { in removeFromParent() 91 void GlobalValue::eraseFromParent() { in eraseFromParent() [all …]
|
H A D | ModuleSummaryIndex.cpp | 42 GlobalValue::VisibilityTypes ValueInfo::getELFVisibility() const { in getELFVisibility() 45 if (S.getVisibility() == GlobalValue::HiddenVisibility) in getELFVisibility() 46 return GlobalValue::HiddenVisibility; in getELFVisibility() 47 if (S.getVisibility() == GlobalValue::ProtectedVisibility) in getELFVisibility() 50 return HasProtected ? GlobalValue::ProtectedVisibility in getELFVisibility() 51 : GlobalValue::DefaultVisibility; in getELFVisibility() 192 bool ModuleSummaryIndex::isGUIDLive(GlobalValue::GUID GUID) const { in isGUIDLive() 263 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols) { in propagateAttributes() 359 return !GlobalValue::isInterposableLinkage(S->linkage()) && in canImportGlobalVar() 398 GlobalValue::GUID Src; [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Linker/ |
H A D | LinkModules.cpp | 34 SetVector<GlobalValue *> ValuesToLink; 51 void addLazyFor(GlobalValue &GV, const IRMover::ValueAdder &Add); 56 bool shouldLinkFromSource(bool &LinkFromSrc, const GlobalValue &Dest, 57 const GlobalValue &Src); 77 DenseMap<const Comdat *, std::vector<GlobalValue *>> LazyComdatMembers; 81 GlobalValue *getLinkedToGlobal(const GlobalValue *SrcGV) { in getLinkedToGlobal() 85 if (!SrcGV->hasName() || GlobalValue::isLocalLinkage(SrcGV->getLinkage())) in getLinkedToGlobal() 89 GlobalValue *DGV = DstM.getNamedValue(SrcGV->getName()); in getLinkedToGlobal() 104 void dropReplacedComdat(GlobalValue &GV, 107 bool linkIfNeeded(GlobalValue &GV, SmallVectorImpl<GlobalValue *> &GVToClone); [all …]
|
H A D | IRMover.cpp | 409 DenseSet<GlobalValue *> ValuesToLink; 410 std::vector<GlobalValue *> Worklist; 411 std::vector<std::pair<GlobalValue *, Value*>> RAUWWorklist; 417 void maybeAdd(GlobalValue *GV) { in maybeAdd() 454 GlobalValue *copyGlobalValueProto(const GlobalValue *SGV, bool ForDefinition); 462 GlobalValue *getLinkedToGlobal(const GlobalValue *SrcGV) { in getLinkedToGlobal() 469 GlobalValue *DGV = DstM.getNamedValue(SrcGV->getName()); in getLinkedToGlobal() 500 bool shouldLink(GlobalValue *DGV, GlobalValue &SGV); 501 Expected<Constant *> linkGlobalValueProto(GlobalValue *GV, 510 Error linkGlobalValueBody(GlobalValue &Dst, GlobalValue &Src); [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/ |
H A D | FunctionImportUtils.h | 34 SetVector<GlobalValue *> *GlobalsToImport; 57 SmallPtrSet<GlobalValue *, 4> Used; 65 bool shouldPromoteLocalToGlobal(const GlobalValue *SGV, ValueInfo VI); 71 bool isNonRenamableLocal(const GlobalValue &GV) const; 81 bool doImportAsDefinition(const GlobalValue *SGV); 85 std::string getPromotedName(const GlobalValue *SGV); 92 void processGlobalForThinLTO(GlobalValue &GV); 98 GlobalValue::LinkageTypes getLinkage(const GlobalValue *SGV, bool DoPromote); 102 SetVector<GlobalValue *> *GlobalsToImport, in FunctionImportGlobalProcessing() 114 SmallVector<GlobalValue *, 4> Vec; in FunctionImportGlobalProcessing() [all …]
|
H A D | FunctionComparator.h | 35 class GlobalValue; variable 55 struct Config : ValueMapConfig<GlobalValue *> { 59 // Each GlobalValue is mapped to an identifier. The Config ensures when RAUW 62 using ValueNumberMap = ValueMap<GlobalValue *, uint64_t, Config>; 71 uint64_t getNumber(GlobalValue* Global) { in getNumber() 80 void erase(GlobalValue *Global) { in erase() 221 int cmpGlobalValues(GlobalValue *L, GlobalValue *R) const;
|
/freebsd/contrib/llvm-project/llvm/lib/LTO/ |
H A D | LTO.cpp | 96 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR, in computeLTOCacheKey() 98 const std::set<GlobalValue::GUID> &CfiFunctionDefs, in computeLTOCacheKey() 99 const std::set<GlobalValue::GUID> &CfiFunctionDecls) { in computeLTOCacheKey() 226 sizeof(GlobalValue::GUID))); in computeLTOCacheKey() 228 sizeof(GlobalValue::LinkageTypes))); in computeLTOCacheKey() 233 std::set<GlobalValue::GUID> UsedCfiDefs; in computeLTOCacheKey() 234 std::set<GlobalValue::GUID> UsedCfiDecls; in computeLTOCacheKey() 237 std::set<GlobalValue::GUID> UsedTypeIds; in computeLTOCacheKey() 239 auto AddUsedCfiGlobal = [&](GlobalValue::GUID ValueGUID) { in computeLTOCacheKey() 280 GlobalValue::LinkageTypes Linkage = GS.second->linkage(); in computeLTOCacheKey() [all …]
|
H A D | ThinLTOCodeGenerator.cpp | 116 return !GlobalValue::isAvailableExternallyLinkage(Linkage) && in getFirstDefinitionForLinker() 117 !GlobalValue::isWeakForLinker(Linkage); in getFirstDefinitionForLinker() 126 return !GlobalValue::isAvailableExternallyLinkage(Linkage); in getFirstDefinitionForLinker() 139 DenseMap<GlobalValue::GUID, const GlobalValueSummary *> &PrevailingCopy) { in computePrevailingCopies() 298 DenseSet<GlobalValue::GUID> &PreservedGUID) { in addUsedSymbolToPreservedGUID() 301 PreservedGUID.insert(GlobalValue::getGUID(Sym.getIRName())); in addUsedSymbolToPreservedGUID() 309 DenseSet<GlobalValue::GUID> &GUIDs) { in computeGUIDPreservedSymbols() 314 GUIDs.insert(GlobalValue::getGUID(GlobalValue::getGlobalIdentifier( in computeGUIDPreservedSymbols() 315 Sym.getIRName(), GlobalValue::ExternalLinkage, ""))); in computeGUIDPreservedSymbols() 319 static DenseSet<GlobalValue::GUID> [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/IPO/ |
H A D | GlobalDCE.h | 48 SmallPtrSet<GlobalValue*, 32> AliveGlobals; 51 DenseMap<GlobalValue *, SmallPtrSet<GlobalValue *, 4>> GVDependencies; 54 std::unordered_map<Constant *, SmallPtrSet<GlobalValue *, 8>> 58 std::unordered_multimap<Comdat *, GlobalValue *> ComdatMembers; 66 SmallPtrSet<GlobalValue *, 32> VFESafeVTables; 68 void UpdateGVDependencies(GlobalValue &GV); 69 void MarkLive(GlobalValue &GV, 70 SmallVectorImpl<GlobalValue *> *Updates = nullptr); 78 void ComputeDependencies(Value *V, SmallPtrSetImpl<GlobalValue *> &U);
|
H A D | Internalize.h | 31 class GlobalValue; variable 48 const std::function<bool(const GlobalValue &)> MustPreserveGV; 53 bool shouldPreserveGV(const GlobalValue &GV); 56 bool maybeInternalize(GlobalValue &GV, 60 void checkComdat(GlobalValue &GV, 65 InternalizePass(std::function<bool(const GlobalValue &)> MustPreserveGV) in InternalizePass() 78 std::function<bool(const GlobalValue &)> MustPreserveGV) { in internalizeModule()
|
H A D | FunctionImport.h | 41 std::unordered_map<GlobalValue::GUID, GlobalValueSummary::ImportKind>; 95 DenseMap<GlobalValue::GUID, 167 function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)> 192 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols, 193 function_ref<PrevailingType(GlobalValue::GUID)> isPrevailing); 199 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols, 200 function_ref<PrevailingType(GlobalValue::GUID)> isPrevailing, 205 bool convertToDeclaration(GlobalValue &GV);
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/IPO/ |
H A D | ExtractGV.cpp | 24 static void makeVisible(GlobalValue &GV, bool Delete) { in makeVisible() 27 GV.setLinkage(GlobalValue::ExternalLinkage); in makeVisible() 29 GV.setVisibility(GlobalValue::HiddenVisibility); in makeVisible() 42 case GlobalValue::LinkOnceAnyLinkage: in makeVisible() 43 GV.setLinkage(GlobalValue::WeakAnyLinkage); in makeVisible() 45 case GlobalValue::LinkOnceODRLinkage: in makeVisible() 46 GV.setLinkage(GlobalValue::WeakODRLinkage); in makeVisible() 54 ExtractGVPass::ExtractGVPass(std::vector<GlobalValue *> &GVs, bool deleteS, in ExtractGVPass() 119 Declaration = Function::Create(FTy, GlobalValue::ExternalLinkage, in run() 124 M, Ty, false, GlobalValue::ExternalLinkage, nullptr, GA.getName()); in run() [all …]
|
H A D | FunctionImport.cpp | 217 if (GlobalValue::isInterposableLinkage(GVSummary->linkage())) in qualifyCalleeCandidates() 241 if (GlobalValue::isLocalLinkage(Summary->linkage()) && in qualifyCalleeCandidates() 323 function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)> 343 GlobalValue::isInterposableLinkage(GVS->second->linkage()) && in shouldImportGlobal() 370 return GlobalValue::isLocalLinkage(RefSummary->linkage()) && in onImportingSummaryImpl() 417 function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)> in GlobalsImporter() 438 function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)> 444 function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)> in ModuleImportsManager() 462 create(function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)> 549 GlobalValue::isLocalLinkage(GVS->linkage())) in computeImportForModule() [all …]
|
H A D | Internalize.cpp | 66 bool operator()(const GlobalValue &GV) { in operator ()() 103 bool InternalizePass::shouldPreserveGV(const GlobalValue &GV) { in shouldPreserveGV() 134 GlobalValue &GV, DenseMap<const Comdat *, ComdatInfo> &ComdatMap) { in maybeInternalize() 166 GV.setVisibility(GlobalValue::DefaultVisibility); in maybeInternalize() 167 GV.setLinkage(GlobalValue::InternalLinkage); in maybeInternalize() 174 GlobalValue &GV, DenseMap<const Comdat *, ComdatInfo> &ComdatMap) { in checkComdat() 188 SmallVector<GlobalValue *, 4> Used; in internalizeModule() 211 for (GlobalValue *V : Used) { in internalizeModule()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/ |
H A D | TargetLoweringObjectFileImpl.h | 24 class GlobalValue; variable 88 const MCExpr *getTTypeGlobalReference(const GlobalValue *GV, 95 MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, 105 const MCExpr *lowerRelativeReference(const GlobalValue *LHS, 106 const GlobalValue *RHS, 139 const MCExpr *getTTypeGlobalReference(const GlobalValue *GV, 146 MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, 151 const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV, 157 void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV, 177 void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV, [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/IR/ |
H A D | ModuleSummaryIndex.h | 151 const GlobalValue *GV; 176 std::map<GlobalValue::GUID, GlobalValueSummaryInfo>; 193 GlobalValue::GUID getGUID() const { return getRef()->first; } in getGUID() 194 const GlobalValue *getValue() const { in getValue() 243 GlobalValue::VisibilityTypes getELFVisibility() const; 507 explicit GVFlags(GlobalValue::LinkageTypes Linkage, 508 GlobalValue::VisibilityTypes Visibility, 526 GlobalValue::GUID OriginalName = 0; 555 GlobalValue::GUID getOriginalName() const { return OriginalName; } 558 void setOriginalName(GlobalValue::GUID Name) { OriginalName = Name; } [all …]
|
H A D | Mangler.h | 22 class GlobalValue; variable 31 mutable DenseMap<const GlobalValue*, unsigned> AnonGlobalIDs; 37 void getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV, 39 void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV, 50 void emitLinkerFlagsForGlobalCOFF(raw_ostream &OS, const GlobalValue *GV, 53 void emitLinkerFlagsForUsedCOFF(raw_ostream &OS, const GlobalValue *GV,
|
/freebsd/contrib/llvm-project/llvm/include/llvm/ProfileData/ |
H A D | PGOCtxProfReader.h | 36 using CallTargetMapTy = std::map<GlobalValue::GUID, PGOContextualProfile>; 41 GlobalValue::GUID GUID = 0; 45 PGOContextualProfile(GlobalValue::GUID G, in PGOContextualProfile() 50 getOrEmplace(uint32_t Index, GlobalValue::GUID G, 59 GlobalValue::GUID guid() const { return GUID; } in guid() 72 void getContainedGuids(DenseSet<GlobalValue::GUID> &Guids) const; 89 Expected<std::map<GlobalValue::GUID, PGOContextualProfile>> loadContexts();
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Target/ |
H A D | TargetLoweringObjectFile.h | 28 class GlobalValue; variable 129 const GlobalValue *GV, 151 virtual const MCExpr *getTTypeGlobalReference(const GlobalValue *GV, 159 MCSymbol *getSymbolWithGlobalValueBase(const GlobalValue *GV, 164 virtual MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, 190 virtual const MCExpr *lowerRelativeReference(const GlobalValue *LHS, in lowerRelativeReference() 191 const GlobalValue *RHS, in lowerRelativeReference() 233 virtual const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV, in getIndirectSymViaGOTPCRel() 274 virtual MCSymbol *getTargetSymbol(const GlobalValue *GV, in getTargetSymbol() 282 virtual MCSymbol *getFunctionEntryPointSymbol(const GlobalValue *Func, in getFunctionEntryPointSymbol()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/LTO/ |
H A D | LTO.h | 48 function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)> 50 function_ref<void(StringRef, GlobalValue::GUID, GlobalValue::LinkageTypes)> 52 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols); 60 function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)> 71 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR, 73 const std::set<GlobalValue::GUID> &CfiFunctionDefs = {}, 74 const std::set<GlobalValue::GUID> &CfiFunctionDecls = {}); 331 std::vector<GlobalValue *> Keep; 348 DenseMap<GlobalValue::GUID, StringRef> PrevailingModuleForGUID; 435 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols); [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/SystemZ/ |
H A D | SystemZConstantPoolValue.h | 17 class GlobalValue; variable 33 const GlobalValue *GV; 37 SystemZConstantPoolValue(const GlobalValue *GV, 42 Create(const GlobalValue *GV, SystemZCP::SystemZCPModifier Modifier); 51 const GlobalValue *getGlobalValue() const { return GV; } in getGlobalValue()
|
/freebsd/contrib/llvm-project/llvm/lib/Frontend/Offloading/ |
H A D | Utility.cpp | 49 GlobalValue::InternalLinkage, AddrName, Prefix); in getOffloadingEntryInitializer() 50 Str->setUnnamedAddr(GlobalValue::UnnamedAddr::Global); in getOffloadingEntryInitializer() 76 /*isConstant=*/true, GlobalValue::WeakAnyLinkage, EntryInitializer, in emitOffloadingEntry() 77 Prefix + Name, nullptr, GlobalValue::NotThreadLocal, in emitOffloadingEntry() 96 auto Linkage = Triple.isOSBinFormatCOFF() ? GlobalValue::WeakODRLinkage in getOffloadEntryArray() 97 : GlobalValue::ExternalLinkage; in getOffloadEntryArray() 102 EntriesB->setVisibility(GlobalValue::HiddenVisibility); in getOffloadEntryArray() 106 EntriesE->setVisibility(GlobalValue::HiddenVisibility); in getOffloadEntryArray()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/NVPTX/ |
H A D | NVPTXUtilities.cpp | 36 typedef std::map<const GlobalValue *, key_val_pair_t> global_val_annot_t; 99 static void cacheAnnotationFromMD(const Module *m, const GlobalValue *gv) { in cacheAnnotationFromMD() 109 GlobalValue *entity = in cacheAnnotationFromMD() 110 mdconst::dyn_extract_or_null<GlobalValue>(elem->getOperand(0)); in cacheAnnotationFromMD() 133 bool findOneNVVMAnnotation(const GlobalValue *gv, const std::string &prop, in findOneNVVMAnnotation() 149 findOneNVVMAnnotation(const GlobalValue &GV, const std::string &PropName) { in findOneNVVMAnnotation() 156 bool findAllNVVMAnnotation(const GlobalValue *gv, const std::string &prop, in findAllNVVMAnnotation() 172 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) { in isTexture() 183 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) { in isSurface() 226 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) { in isSampler() [all …]
|