Lines Matching refs:GV

92     const GlobalValue &GV) const {  in isNonRenamableLocal()
93 if (!GV.hasLocalLinkage()) in isNonRenamableLocal()
96 if (GV.hasSection()) in isNonRenamableLocal()
98 if (Used.count(const_cast<GlobalValue *>(&GV))) in isNonRenamableLocal()
220 void FunctionImportGlobalProcessing::processGlobalForThinLTO(GlobalValue &GV) { in processGlobalForThinLTO() argument
223 if (GV.hasName()) { in processGlobalForThinLTO()
224 VI = ImportIndex.getValueInfo(GV.getGUID()); in processGlobalForThinLTO()
227 if (Function *F = dyn_cast<Function>(&GV)) { in processGlobalForThinLTO()
244 assert(VI || GV.isDeclaration() || in processGlobalForThinLTO()
245 (isPerformingImport() && !doImportAsDefinition(&GV))); in processGlobalForThinLTO()
256 if (!GV.isDeclaration() && VI && ImportIndex.withAttributePropagation()) { in processGlobalForThinLTO()
257 if (GlobalVariable *V = dyn_cast<GlobalVariable>(&GV)) { in processGlobalForThinLTO()
285 if (GV.hasLocalLinkage() && shouldPromoteLocalToGlobal(&GV, VI)) { in processGlobalForThinLTO()
287 auto Name = GV.getName().str(); in processGlobalForThinLTO()
288 GV.setName(getPromotedName(&GV)); in processGlobalForThinLTO()
289 GV.setLinkage(getLinkage(&GV, /* DoPromote */ true)); in processGlobalForThinLTO()
290 assert(!GV.hasLocalLinkage()); in processGlobalForThinLTO()
291 GV.setVisibility(GlobalValue::HiddenVisibility); in processGlobalForThinLTO()
295 if (const auto *C = GV.getComdat()) in processGlobalForThinLTO()
297 RenamedComdats.try_emplace(C, M.getOrInsertComdat(GV.getName())); in processGlobalForThinLTO()
299 GV.setLinkage(getLinkage(&GV, /* DoPromote */ false)); in processGlobalForThinLTO()
305 (GV.isDeclarationForLinker() || in processGlobalForThinLTO()
306 (isPerformingImport() && !doImportAsDefinition(&GV))) && in processGlobalForThinLTO()
307 !GV.isImplicitDSOLocal()) { in processGlobalForThinLTO()
308 GV.setDSOLocal(false); in processGlobalForThinLTO()
312 GV.setDSOLocal(true); in processGlobalForThinLTO()
313 if (GV.hasDLLImportStorageClass()) in processGlobalForThinLTO()
314 GV.setDLLStorageClass(GlobalValue::DefaultStorageClass); in processGlobalForThinLTO()
320 auto *GO = dyn_cast<GlobalObject>(&GV); in processGlobalForThinLTO()
332 for (GlobalVariable &GV : M.globals()) in processGlobalsForThinLTO()
333 processGlobalForThinLTO(GV); in processGlobalsForThinLTO()