[compiler-rt] [llvm] [ThinLTO]Clean up 'import-assume-unique-local' flag. (PR #102424)
Mingming Liu via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 7 21:52:01 PDT 2024
https://github.com/minglotus-6 created https://github.com/llvm/llvm-project/pull/102424
None
>From 1dacfa74c8054e9117db5e68289318dd32c177fd Mon Sep 17 00:00:00 2001
From: mingmingl <mingmingl at google.com>
Date: Wed, 7 Aug 2024 21:50:04 -0700
Subject: [PATCH] [ThinLTO]Clean up 'import-assume-unique-local' flag
---
.../profile/Linux/instrprof-vtable-value-prof.cpp | 1 -
llvm/lib/Transforms/IPO/FunctionImport.cpp | 13 +------------
2 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/compiler-rt/test/profile/Linux/instrprof-vtable-value-prof.cpp b/compiler-rt/test/profile/Linux/instrprof-vtable-value-prof.cpp
index 214c1504db7f4..e6a4af7b631e9 100644
--- a/compiler-rt/test/profile/Linux/instrprof-vtable-value-prof.cpp
+++ b/compiler-rt/test/profile/Linux/instrprof-vtable-value-prof.cpp
@@ -141,7 +141,6 @@
// RUN: -g -flto=thin -fwhole-program-vtables -fno-split-lto-unit -O2 \
// RUN: -mllvm -enable-vtable-value-profiling -Wl,-mllvm,-enable-vtable-value-profiling \
// RUN: -mllvm -enable-vtable-profile-use \
-// RUN: -Wl,-plugin-opt,-import-assume-unique-local \
// RUN: -Wl,-mllvm,-enable-vtable-profile-use -Rpass=pgo-icall-prom \
// RUN: -Wl,-mllvm,-print-after=pgo-icall-prom \
// RUN: -Wl,-mllvm,-filter-print-funcs=main lib.cpp main.cpp 2>&1 \
diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp
index 210b79e3a0adc..268b408fc7286 100644
--- a/llvm/lib/Transforms/IPO/FunctionImport.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp
@@ -174,17 +174,6 @@ 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 "
- "user specify the full module path."),
- cl::Hidden);
-
namespace llvm {
extern cl::opt<bool> EnableMemProfContextDisambiguation;
}
@@ -212,7 +201,7 @@ static bool shouldSkipLocalInAnotherModule(const GlobalValueSummary *RefSummary,
StringRef ImporterModule) {
// We can import a local from another module if all inputs are compiled
// with full paths or when there is one definition.
- if (ImportAssumeUniqueLocal || NumDefs == 1)
+ if (NumDefs == 1)
return false;
// In other cases, make sure we import the copy in the caller's module if the
// referenced value has local linkage. The only time a local variable can
More information about the llvm-commits
mailing list