Lines Matching refs:GA
2221 static bool hasUseOtherThanLLVMUsed(GlobalAlias &GA, const LLVMUsed &U) { in hasUseOtherThanLLVMUsed() argument
2222 if (GA.use_empty()) // No use at all. in hasUseOtherThanLLVMUsed()
2225 assert((!U.usedCount(&GA) || !U.compilerUsedCount(&GA)) && in hasUseOtherThanLLVMUsed()
2228 if (!GA.hasOneUse()) in hasUseOtherThanLLVMUsed()
2234 return !U.usedCount(&GA) && !U.compilerUsedCount(&GA); in hasUseOtherThanLLVMUsed()
2248 static bool mayHaveOtherReferences(GlobalAlias &GA, const LLVMUsed &U) { in mayHaveOtherReferences() argument
2249 if (!GA.hasLocalLinkage()) in mayHaveOtherReferences()
2252 return U.usedCount(&GA) || U.compilerUsedCount(&GA); in mayHaveOtherReferences()
2255 static bool hasUsesToReplace(GlobalAlias &GA, const LLVMUsed &U, in hasUsesToReplace() argument
2259 if (hasUseOtherThanLLVMUsed(GA, U)) in hasUsesToReplace()
2263 if (!mayHaveOtherReferences(GA, U)) in hasUsesToReplace()
2272 Constant *Aliasee = GA.getAliasee(); in hasUsesToReplace()
2479 for (GlobalAlias &GA : M.aliases()) in optimizeGlobalsInModule()
2480 if (const Comdat *C = GA.getComdat()) in optimizeGlobalsInModule()
2481 if (!GA.isDiscardableIfUnused() || !GA.use_empty()) in optimizeGlobalsInModule()