[llvm] [ElimAvailExtern] Add an option to allow to convert global variables in a specified address space to local (PR #144287)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 16 09:24:38 PDT 2025
================
@@ -35,8 +35,14 @@ static cl::opt<bool> ConvertToLocal(
cl::desc("Convert available_externally into locals, renaming them "
"to avoid link-time clashes."));
+static cl::opt<unsigned> ConvertGlobalVariableInAddrSpace(
+ "avail-extern-gv-in-addrspace-to-local", cl::Hidden,
+ cl::desc(
+ "Convert available_externally global variables into locals if they are "
+ "in specificed addrspace, renaming them to avoid link-time clashes."));
+
STATISTIC(NumRemovals, "Number of functions removed");
-STATISTIC(NumConversions, "Number of functions converted");
+STATISTIC(NumConversions, "Number of functions and globals converted");
----------------
shiltian wrote:
Sure, will do
https://github.com/llvm/llvm-project/pull/144287
More information about the llvm-commits
mailing list