[compiler-rt] [llvm] [ThinLTO][TypeProf] Import local-linkage global var for mod1:func_foo-> mod2:local-var edge (PR #100448)
Alexander Yermolovich via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 25 13:21:41 PDT 2024
================
@@ -174,6 +174,17 @@ static cl::opt<std::string> WorkloadDefinitions(
"}"),
cl::Hidden);
+static cl::opt<bool> ImportAssumeUniqueLocal(
+ "import-assume-unique-local", cl::init(false),
+ cl::desc(
+ "By default, a local-linkage global variable won't be imported in the "
+ "edge mod1:func -> mod2:local-var (from value profiles) since compiler "
+ "cannot assume mod2 is compiled with full path which gives local-var a "
+ "program-wide unique GUID. Set this option to true will help cross "
+ "module import of such variables. This is only safe if the compiler "
----------------
ayermolo wrote:
I am trying to learn more about this space. Can you elaborate on "This is only safe if the compiler user specify the full module path." How does user specify it? I looked at the test and it's not clear to me from it.
https://github.com/llvm/llvm-project/pull/100448
More information about the llvm-commits
mailing list