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 214c1504db7f45..e6a4af7b631e90 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 6c4f4001aab35f..3364628be841e3 100644 --- a/llvm/lib/Transforms/IPO/FunctionImport.cpp +++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp @@ -174,17 +174,6 @@ static cl::opt WorkloadDefinitions( "}"), cl::Hidden); -static cl::opt 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); - static cl::opt ContextualProfile("thinlto-pgo-ctx-prof", cl::desc("Path to a contextual profile."), cl::Hidden); @@ -214,9 +203,8 @@ static std::unique_ptr loadFile(const std::string &FileName, static bool shouldSkipLocalInAnotherModule(const GlobalValueSummary *RefSummary, size_t NumDefs, 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) + // We can import a local when there is one definition. + 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