Lines Matching refs:GA
2655 static bool hasUseOtherThanLLVMUsed(GlobalAlias &GA, const LLVMUsed &U) { in hasUseOtherThanLLVMUsed() argument
2656 if (GA.use_empty()) // No use at all. in hasUseOtherThanLLVMUsed()
2659 assert((!U.usedCount(&GA) || !U.compilerUsedCount(&GA)) && in hasUseOtherThanLLVMUsed()
2662 if (!GA.hasOneUse()) in hasUseOtherThanLLVMUsed()
2668 return !U.usedCount(&GA) && !U.compilerUsedCount(&GA); in hasUseOtherThanLLVMUsed()
2682 static bool mayHaveOtherReferences(GlobalAlias &GA, const LLVMUsed &U) { in mayHaveOtherReferences() argument
2683 if (!GA.hasLocalLinkage()) in mayHaveOtherReferences()
2686 return U.usedCount(&GA) || U.compilerUsedCount(&GA); in mayHaveOtherReferences()
2689 static bool hasUsesToReplace(GlobalAlias &GA, const LLVMUsed &U, in hasUsesToReplace() argument
2693 if (hasUseOtherThanLLVMUsed(GA, U)) in hasUsesToReplace()
2697 if (!mayHaveOtherReferences(GA, U)) in hasUsesToReplace()
2706 Constant *Aliasee = GA.getAliasee(); in hasUsesToReplace()
2921 for (GlobalAlias &GA : M.aliases()) in optimizeGlobalsInModule()
2922 if (const Comdat *C = GA.getComdat()) in optimizeGlobalsInModule()
2923 if (!GA.isDiscardableIfUnused() || !GA.use_empty()) in optimizeGlobalsInModule()