Lines Matching refs:GV

73                             const GlobalValue *GV, const User *U) {  in addNonConstUser()  argument
78 GVtoClusterMap.unionSets(GV, F); in addNonConstUser()
80 GVtoClusterMap.unionSets(GV, GVU); in addNonConstUser()
88 const GlobalValue *GV, const Value *V) { in addAllGlobalValueUsers() argument
99 addNonConstUser(GVtoClusterMap, GV, UU); in addAllGlobalValueUsers()
104 static const GlobalObject *getGVPartitioningRoot(const GlobalValue *GV) { in getGVPartitioningRoot() argument
105 const GlobalObject *GO = GV->getAliaseeObject(); in getGVPartitioningRoot()
125 auto recordGVSet = [&GVtoClusterMap, &ComdatMembers](GlobalValue &GV) { in findPartitions() argument
126 if (GV.isDeclaration()) in findPartitions()
129 if (!GV.hasName()) in findPartitions()
130 GV.setName("__llvmsplit_unnamed"); in findPartitions()
136 if (const Comdat *C = GV.getComdat()) { in findPartitions()
139 GVtoClusterMap.unionSets(Member, &GV); in findPartitions()
141 Member = &GV; in findPartitions()
146 if (const GlobalObject *Root = getGVPartitioningRoot(&GV)) in findPartitions()
147 if (&GV != Root) in findPartitions()
148 GVtoClusterMap.unionSets(&GV, Root); in findPartitions()
150 if (const Function *F = dyn_cast<Function>(&GV)) { in findPartitions()
159 if (GV.hasLocalLinkage()) in findPartitions()
160 addAllGlobalValueUsers(GVtoClusterMap, &GV, &GV); in findPartitions()
222 static void externalize(GlobalValue *GV) { in externalize() argument
223 if (GV->hasLocalLinkage()) { in externalize()
224 GV->setLinkage(GlobalValue::ExternalLinkage); in externalize()
225 GV->setVisibility(GlobalValue::HiddenVisibility); in externalize()
230 if (!GV->hasName()) in externalize()
231 GV->setName("__llvmsplit_unnamed"); in externalize()
235 static bool isInPartition(const GlobalValue *GV, unsigned I, unsigned N) { in isInPartition() argument
236 if (const GlobalObject *Root = getGVPartitioningRoot(GV)) in isInPartition()
237 GV = Root; in isInPartition()
240 if (const Comdat *C = GV->getComdat()) in isInPartition()
243 Name = GV->getName(); in isInPartition()
262 for (GlobalVariable &GV : M.globals()) in SplitModule()
263 externalize(&GV); in SplitModule()
316 CloneModule(M, VMap, [&](const GlobalValue *GV) { in SplitModule() argument
317 if (auto It = ClusterIDMap.find(GV); It != ClusterIDMap.end()) in SplitModule()
320 return isInPartition(GV, I, N); in SplitModule()