Lines Matching refs:GV
82 const GlobalValue &GV) const { in isNonRenamableLocal()
83 if (!GV.hasLocalLinkage()) in isNonRenamableLocal()
86 if (GV.hasSection()) in isNonRenamableLocal()
88 if (Used.count(const_cast<GlobalValue *>(&GV))) in isNonRenamableLocal()
200 void FunctionImportGlobalProcessing::processGlobalForThinLTO(GlobalValue &GV) { in processGlobalForThinLTO() argument
203 if (GV.hasName()) { in processGlobalForThinLTO()
204 VI = ImportIndex.getValueInfo(GV.getGUID()); in processGlobalForThinLTO()
207 if (Function *F = dyn_cast<Function>(&GV)) { in processGlobalForThinLTO()
224 assert(VI || GV.isDeclaration() || in processGlobalForThinLTO()
225 (isPerformingImport() && !doImportAsDefinition(&GV))); in processGlobalForThinLTO()
236 if (!GV.isDeclaration() && VI && ImportIndex.withAttributePropagation()) { in processGlobalForThinLTO()
237 if (GlobalVariable *V = dyn_cast<GlobalVariable>(&GV)) { in processGlobalForThinLTO()
265 if (GV.hasLocalLinkage() && shouldPromoteLocalToGlobal(&GV, VI)) { in processGlobalForThinLTO()
267 auto Name = GV.getName().str(); in processGlobalForThinLTO()
268 GV.setName(getPromotedName(&GV)); in processGlobalForThinLTO()
269 GV.setLinkage(getLinkage(&GV, /* DoPromote */ true)); in processGlobalForThinLTO()
270 assert(!GV.hasLocalLinkage()); in processGlobalForThinLTO()
271 GV.setVisibility(GlobalValue::HiddenVisibility); in processGlobalForThinLTO()
275 if (const auto *C = GV.getComdat()) in processGlobalForThinLTO()
277 RenamedComdats.try_emplace(C, M.getOrInsertComdat(GV.getName())); in processGlobalForThinLTO()
279 GV.setLinkage(getLinkage(&GV, /* DoPromote */ false)); in processGlobalForThinLTO()
285 (GV.isDeclarationForLinker() || in processGlobalForThinLTO()
286 (isPerformingImport() && !doImportAsDefinition(&GV))) && in processGlobalForThinLTO()
287 !GV.isImplicitDSOLocal()) { in processGlobalForThinLTO()
288 GV.setDSOLocal(false); in processGlobalForThinLTO()
292 GV.setDSOLocal(true); in processGlobalForThinLTO()
293 if (GV.hasDLLImportStorageClass()) in processGlobalForThinLTO()
294 GV.setDLLStorageClass(GlobalValue::DefaultStorageClass); in processGlobalForThinLTO()
300 auto *GO = dyn_cast<GlobalObject>(&GV); in processGlobalForThinLTO()
312 for (GlobalVariable &GV : M.globals()) in processGlobalsForThinLTO()
313 processGlobalForThinLTO(GV); in processGlobalsForThinLTO()