Home
last modified time | relevance | path

Searched refs:GlobalValue (Results 1 – 25 of 523) sorted by relevance

12345678910>>...21

/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DFunctionImportUtils.cpp20 const GlobalValue *SGV) { in doImportAsDefinition()
82 const GlobalValue &GV) const { in isNonRenamableLocal()
105 GlobalValue::LinkageTypes
123 case GlobalValue::LinkOnceODRLinkage: in getLinkage()
124 case GlobalValue::ExternalLinkage: in getLinkage()
143 case GlobalValue::WeakAnyLinkage: in getLinkage()
153 case GlobalValue::WeakODRLinkage: in getLinkage()
163 case GlobalValue::AppendingLinkage: in getLinkage()
171 case GlobalValue::InternalLinkage: in getLinkage()
172 case GlobalValue::PrivateLinkage: in getLinkage()
[all …]
H A DSplitModule.cpp54 using ClusterMapType = EquivalenceClasses<const GlobalValue *>;
56 using ClusterIDMapType = DenseMap<const GlobalValue *, unsigned>;
61 const GlobalValue *GV, const User *U) { in addNonConstUser()
65 const GlobalValue *F = I->getParent()->getParent(); in addNonConstUser()
67 } else if (const GlobalValue *GVU = dyn_cast<GlobalValue>(U)) { in addNonConstUser()
83 if (isa<Constant>(UU) && !isa<GlobalValue>(UU)) { in addAllGlobalValueUsers()
175 SmallPtrSet<const GlobalValue *, 32> Visited; in findPartitions()
218 static void externalize(GlobalValue *GV) { in externalize()
220 GV->setLinkage(GlobalValue::ExternalLinkage); in externalize()
221 GV->setVisibility(GlobalValue::HiddenVisibility); in externalize()
[all …]
/llvm-project-15.0.7/llvm/lib/IR/
H A DGlobals.cpp34 static_assert(sizeof(GlobalValue) ==
42 bool GlobalValue::isMaterializable() const { in isMaterializable()
47 Error GlobalValue::materialize() { in materialize()
53 void GlobalValue::destroyConstantImpl() { in destroyConstantImpl()
63 void GlobalValue::copyAttributesFrom(const GlobalValue *Src) { in copyAttributesFrom()
76 void GlobalValue::removeFromParent() { in removeFromParent()
88 void GlobalValue::eraseFromParent() { in eraseFromParent()
102 bool GlobalValue::isInterposable() const { in isInterposable()
137 GlobalValue::copyAttributesFrom(Src); in copyAttributesFrom()
171 StringRef GlobalValue::getSection() const { in getSection()
[all …]
H A DModuleSummaryIndex.cpp46 return GlobalValue::HiddenVisibility; in getELFVisibility()
386 GlobalValue::GUID Src;
387 GlobalValue::GUID Dst;
426 case GlobalValue::ExternalLinkage: in linkageToString()
434 case GlobalValue::WeakAnyLinkage: in linkageToString()
436 case GlobalValue::WeakODRLinkage: in linkageToString()
438 case GlobalValue::AppendingLinkage: in linkageToString()
440 case GlobalValue::InternalLinkage: in linkageToString()
442 case GlobalValue::PrivateLinkage: in linkageToString()
446 case GlobalValue::CommonLinkage: in linkageToString()
[all …]
/llvm-project-15.0.7/llvm/lib/Linker/
H A DLinkModules.cpp34 SetVector<GlobalValue *> ValuesToLink;
81 GlobalValue *getLinkedToGlobal(const GlobalValue *SrcGV) { in getLinkedToGlobal()
107 bool linkIfNeeded(GlobalValue &GV, SmallVectorImpl<GlobalValue *> &GVToClone);
120 static GlobalValue::VisibilityTypes
123 if (A == GlobalValue::HiddenVisibility || B == GlobalValue::HiddenVisibility) in getMinVisibility()
124 return GlobalValue::HiddenVisibility; in getMinVisibility()
128 return GlobalValue::DefaultVisibility; in getMinVisibility()
367 GlobalValue::UnnamedAddr UnnamedAddr = GlobalValue::getMinUnnamedAddr( in linkIfNeeded()
443 GlobalValue *Declaration; in dropReplacedComdat()
534 for (GlobalValue *GV : GVToClone) { in run()
[all …]
H A DIRMover.cpp454 GlobalValue *getLinkedToGlobal(const GlobalValue *SrcGV) { in getLinkedToGlobal()
492 bool shouldLink(GlobalValue *DGV, GlobalValue &SGV);
502 Error linkGlobalValueBody(GlobalValue &Dst, GlobalValue &Src);
512 GlobalValue *copyIndirectSymbolProto(const GlobalValue *SGV);
602 GlobalValue *New = dyn_cast<GlobalValue>(*NewProto); in materialize()
691 GlobalValue *IRLinker::copyIndirectSymbolProto(const GlobalValue *SGV) { in copyIndirectSymbolProto()
715 GlobalValue *IRLinker::copyGlobalValueProto(const GlobalValue *SGV, in copyGlobalValueProto()
717 GlobalValue *NewGV; in copyGlobalValueProto()
981 bool IRLinker::shouldLink(GlobalValue *DGV, GlobalValue &SGV) { in shouldLink()
1028 GlobalValue *NewGV; in linkGlobalValueProto()
[all …]
/llvm-project-15.0.7/llvm/include/llvm/Transforms/Utils/
H A DFunctionImportUtils.h34 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 DFunctionComparator.h35 class GlobalValue; variable
55 struct Config : ValueMapConfig<GlobalValue *> {
62 using ValueNumberMap = ValueMap<GlobalValue *, uint64_t, Config>;
71 uint64_t getNumber(GlobalValue* Global) { in getNumber()
80 void erase(GlobalValue *Global) { in erase()
226 int cmpGlobalValues(GlobalValue *L, GlobalValue *R) const;
/llvm-project-15.0.7/llvm/unittests/IR/
H A DManglerTest.cpp28 GlobalValue::LinkageTypes Linkage, in mangleFunc()
56 EXPECT_EQ(mangleFunc("foo", llvm::GlobalValue::ExternalLinkage, in TEST()
59 EXPECT_EQ(mangleFunc("?foo", llvm::GlobalValue::ExternalLinkage, in TEST()
62 EXPECT_EQ(mangleFunc("foo", llvm::GlobalValue::PrivateLinkage, in TEST()
76 EXPECT_EQ(mangleFunc("foo", llvm::GlobalValue::ExternalLinkage, in TEST()
79 EXPECT_EQ(mangleFunc("?foo", llvm::GlobalValue::ExternalLinkage, in TEST()
82 EXPECT_EQ(mangleFunc("foo", llvm::GlobalValue::PrivateLinkage, in TEST()
112 EXPECT_EQ(mangleFunc("foo", llvm::GlobalValue::ExternalLinkage, in TEST()
118 EXPECT_EQ(mangleFunc("foo", llvm::GlobalValue::PrivateLinkage, in TEST()
154 EXPECT_EQ(mangleFunc("foo", llvm::GlobalValue::PrivateLinkage, in TEST()
[all …]
/llvm-project-15.0.7/llvm/include/llvm/Transforms/IPO/
H A DGlobalDCE.h41 SmallPtrSet<GlobalValue*, 32> AliveGlobals;
44 DenseMap<GlobalValue *, SmallPtrSet<GlobalValue *, 4>> GVDependencies;
47 std::unordered_map<Constant *, SmallPtrSet<GlobalValue *, 8>>
51 std::unordered_multimap<Comdat *, GlobalValue *> ComdatMembers;
59 SmallPtrSet<GlobalValue *, 32> VFESafeVTables;
61 void UpdateGVDependencies(GlobalValue &GV);
62 void MarkLive(GlobalValue &GV,
63 SmallVectorImpl<GlobalValue *> *Updates = nullptr);
64 bool RemoveUnusedGlobalValue(GlobalValue &GV);
72 void ComputeDependencies(Value *V, SmallPtrSetImpl<GlobalValue *> &U);
H A DInternalize.h47 const std::function<bool(const GlobalValue &)> MustPreserveGV;
52 bool shouldPreserveGV(const GlobalValue &GV);
55 bool maybeInternalize(GlobalValue &GV,
59 void checkComdat(GlobalValue &GV,
64 InternalizePass(std::function<bool(const GlobalValue &)> MustPreserveGV) in InternalizePass()
80 std::function<bool(const GlobalValue &)> MustPreserveGV,
H A DFunctionImport.h37 using FunctionsToImportTy = std::unordered_set<GlobalValue::GUID>;
91 DenseMap<GlobalValue::GUID,
189 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols,
190 function_ref<PrevailingType(GlobalValue::GUID)> isPrevailing);
196 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols,
197 function_ref<PrevailingType(GlobalValue::GUID)> isPrevailing,
202 bool convertToDeclaration(GlobalValue &GV);
/llvm-project-15.0.7/llvm/tools/llvm-reduce/deltas/
H A DReduceGlobalValues.cpp19 static bool shouldReduceDSOLocal(GlobalValue &GV) { in shouldReduceDSOLocal()
23 static bool shouldReduceVisibility(GlobalValue &GV) { in shouldReduceVisibility()
24 return GV.getVisibility() != GlobalValue::VisibilityTypes::DefaultVisibility; in shouldReduceVisibility()
27 static bool shouldReduceUnnamedAddress(GlobalValue &GV) { in shouldReduceUnnamedAddress()
28 return GV.getUnnamedAddr() != GlobalValue::UnnamedAddr::None; in shouldReduceUnnamedAddress()
31 static bool shouldReduceDLLStorageClass(GlobalValue &GV) { in shouldReduceDLLStorageClass()
33 GlobalValue::DLLStorageClassTypes::DefaultStorageClass; in shouldReduceDLLStorageClass()
36 static bool shouldReduceThreadLocal(GlobalValue &GV) { in shouldReduceThreadLocal()
46 GV.setVisibility(GlobalValue::VisibilityTypes::DefaultVisibility); in reduceGVs()
51 GV.setUnnamedAddr(GlobalValue::UnnamedAddr::None); in reduceGVs()
[all …]
/llvm-project-15.0.7/llvm/lib/LTO/
H A DLTO.cpp84 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR, in computeLTOCacheKey()
327 function_ref<void(StringRef, GlobalValue::GUID, GlobalValue::LinkageTypes)> in thinLTOResolvePrevailingGUID()
768 if (GlobalValue *GV = Msym.dyn_cast<GlobalValue *>()) { in addRegularLTO()
906 auto GUID = GlobalValue::getGUID(GlobalValue::getGlobalIdentifier( in addThinLTO()
1010 GlobalValue::GUID GUID = GlobalValue::getGUID( in run()
1121 GlobalValue *GV = in runRegularLTO()
1238 GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name))); in InProcessThinBackend()
1241 GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name))); in InProcessThinBackend()
1305 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> in start()
1527 GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Def))); in runThinLTO()
[all …]
H A DThinLTOCodeGenerator.cpp115 !GlobalValue::isWeakForLinker(Linkage); in getFirstDefinitionForLinker()
311 GUIDs.insert(GlobalValue::getGUID(GlobalValue::getGlobalIdentifier( in computeGUIDPreservedSymbols()
316 static DenseSet<GlobalValue::GUID>
363 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR, in ModuleCacheEntry()
526 StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>> in resolvePrevailingInIndex()
687 auto isPrevailing = [&](GlobalValue::GUID G) { in computeDeadSymbolsInIndex()
727 StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>> ResolvedODR; in promote()
893 StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>> ResolvedODR; in internalize()
1036 DenseSet<GlobalValue::GUID> GUIDPreservedSymbols; in run()
1066 std::set<GlobalValue::GUID> ExportedGUIDs; in run()
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/IPO/
H A DExtractGV.cpp24 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 SetVector<GlobalValue *> Named;
63 explicit GVExtractorPass(std::vector<GlobalValue*> &GVs, in GVExtractorPass()
134 Function::Create(FTy, GlobalValue::ExternalLinkage, in runOnModule()
[all …]
H A DInternalize.cpp67 bool operator()(const GlobalValue &GV) { in operator ()()
104 bool InternalizePass::shouldPreserveGV(const GlobalValue &GV) { in shouldPreserveGV()
135 GlobalValue &GV, DenseMap<const Comdat *, ComdatInfo> &ComdatMap) { in maybeInternalize()
167 GV.setVisibility(GlobalValue::DefaultVisibility); in maybeInternalize()
168 GV.setLinkage(GlobalValue::InternalLinkage); in maybeInternalize()
175 GlobalValue &GV, DenseMap<const Comdat *, ComdatInfo> &ComdatMap) { in checkComdat()
190 SmallVector<GlobalValue *, 4> Used; in internalizeModule()
213 for (GlobalValue *V : Used) { in internalizeModule()
291 std::function<bool(const GlobalValue &)> MustPreserveGV;
298 InternalizeLegacyPass(std::function<bool(const GlobalValue &)> MustPreserveGV) in InternalizeLegacyPass()
[all …]
H A DFunctionImport.cpp177 GlobalValue::GUID GUID) { in selectCallee()
602 GlobalValue::GUID G) { in isGlobalVarSummary()
625 DenseSet<GlobalValue::GUID> FlattenedImports; in checkVariableImport()
1016 bool llvm::convertToDeclaration(GlobalValue &GV) { in convertToDeclaration()
1025 V->setLinkage(GlobalValue::ExternalLinkage); in convertToDeclaration()
1029 GlobalValue *NewGV; in convertToDeclaration()
1083 GlobalValue::isLocalLinkage(NewLinkage) || in thinLTOFinalizeInModule()
1169 OrigName, GlobalValue::InternalLinkage, in thinLTOInternalizeModule()
1213 GV.setLinkage(GlobalValue::InternalLinkage); in internalizeGVsAfterImport()
1250 SetVector<GlobalValue *> GlobalsToImport; in importFunctions()
[all …]
/llvm-project-15.0.7/llvm/include/llvm/CodeGen/
H A DTargetLoweringObjectFileImpl.h24 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,
189 const MCExpr *lowerRelativeReference(const GlobalValue *LHS,
190 const GlobalValue *RHS,
225 const MCExpr *lowerRelativeReference(const GlobalValue *LHS,
[all …]
/llvm-project-15.0.7/llvm/include/llvm/IR/
H A DMangler.h21 class GlobalValue; variable
30 mutable DenseMap<const GlobalValue*, unsigned> AnonGlobalIDs;
36 void getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV,
38 void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV,
49 void emitLinkerFlagsForGlobalCOFF(raw_ostream &OS, const GlobalValue *GV,
52 void emitLinkerFlagsForUsedCOFF(raw_ostream &OS, const GlobalValue *GV,
H A DModuleSummaryIndex.h138 const GlobalValue *GV;
181 const GlobalValue *getValue() const { in getValue()
353 GlobalValue::GUID OriginalName = 0;
401 GlobalValue::LinkageTypes linkage() const {
492 GlobalValue::GUID getAliaseeGUID() const {
529 GlobalValue::GUID GUID;
671 GlobalValue::DefaultVisibility,
676 std::vector<GlobalValue::GUID>(),
827 void addTypeTest(GlobalValue::GUID Guid) {
1109 std::map<GlobalValue::GUID, GlobalValue::GUID> OidGuidMap;
[all …]
/llvm-project-15.0.7/llvm/include/llvm/Target/
H A DTargetLoweringObjectFile.h28 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()
/llvm-project-15.0.7/llvm/lib/Target/SystemZ/
H A DSystemZConstantPoolValue.h17 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()
/llvm-project-15.0.7/llvm/include/llvm/LTO/
H A DLTO.h48 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 = {});
309 std::vector<GlobalValue *> Keep;
326 DenseMap<GlobalValue::GUID, StringRef> PrevailingModuleForGUID;
411 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols);
[all …]
/llvm-project-15.0.7/llvm/lib/Target/NVPTX/
H A DNVPTXUtilities.cpp33 typedef std::map<const GlobalValue *, key_val_pair_t> global_val_annot_t;
79 static void cacheAnnotationFromMD(const Module *m, const GlobalValue *gv) { in cacheAnnotationFromMD()
89 GlobalValue *entity = in cacheAnnotationFromMD()
90 mdconst::dyn_extract_or_null<GlobalValue>(elem->getOperand(0)); in cacheAnnotationFromMD()
113 bool findOneNVVMAnnotation(const GlobalValue *gv, const std::string &prop, in findOneNVVMAnnotation()
128 bool findAllNVVMAnnotation(const GlobalValue *gv, const std::string &prop, in findAllNVVMAnnotation()
144 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) { in isTexture()
155 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) { in isSurface()
168 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) { in isSampler()
227 if(const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) { in isManaged()

12345678910>>...21