[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 Aug 8 13:52:11 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:

Gotcha, thx for explanation.

https://github.com/llvm/llvm-project/pull/100448


More information about the llvm-commits mailing list