[clang] e9d1a67 - [CSSPGO] Do not pass -fpseudo-probe-for-profiling to the linker.
Hongtao Yu via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 23 15:50:45 PDT 2021
Author: Hongtao Yu
Date: 2021-09-23T15:50:40-07:00
New Revision: e9d1a679a1c9cb309aea8c5d944e55865d38b867
URL: https://github.com/llvm/llvm-project/commit/e9d1a679a1c9cb309aea8c5d944e55865d38b867
DIFF: https://github.com/llvm/llvm-project/commit/e9d1a679a1c9cb309aea8c5d944e55865d38b867.diff
LOG: [CSSPGO] Do not pass -fpseudo-probe-for-profiling to the linker.
The correponding linker switch has been removed by https://reviews.llvm.org/D110209, so do not pass it in clang.
Reviewed By: wenlei
Differential Revision: https://reviews.llvm.org/D110371
Added:
Modified:
clang/lib/Driver/ToolChains/CommonArgs.cpp
Removed:
clang/test/Driver/pseudo-probe-lto.c
################################################################################
diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp
index f440fd4ca33d3..9f1895466c98d 100644
--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -620,11 +620,6 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args,
CmdArgs.push_back("-plugin-opt=new-pass-manager");
}
- // Pass an option to enable pseudo probe emission.
- if (Args.hasFlag(options::OPT_fpseudo_probe_for_profiling,
- options::OPT_fno_pseudo_probe_for_profiling, false))
- CmdArgs.push_back("-plugin-opt=pseudo-probe-for-profiling");
-
// Setup statistics file output.
SmallString<128> StatsFile = getStatsFileName(Args, Output, Input, D);
if (!StatsFile.empty())
diff --git a/clang/test/Driver/pseudo-probe-lto.c b/clang/test/Driver/pseudo-probe-lto.c
deleted file mode 100644
index e319b8c0098bf..0000000000000
--- a/clang/test/Driver/pseudo-probe-lto.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: touch %t.o
-// RUN: %clang -### %t.o -target x86_64-unknown-linux -flto -fpseudo-probe-for-profiling 2>&1 | FileCheck %s --check-prefix=PROBE
-// RUN: %clang -### %t.o -target x86_64-unknown-linux -flto=thin -fpseudo-probe-for-profiling 2>&1 | FileCheck %s --check-prefix=PROBE
-// RUN: %clang -### %t.o -target x86_64-unknown-linux -flto -fno-pseudo-probe-for-profiling -fpseudo-probe-for-profiling 2>&1 | FileCheck %s --check-prefix=PROBE
-// RUN: %clang -### %t.o -target x86_64-unknown-linux -flto 2>&1 | FileCheck %s --check-prefix=NOPROBE
-// RUN: %clang -### %t.o -target x86_64-unknown-linux -flto -fno-pseudo-probe-for-profiling 2>&1 | FileCheck %s --check-prefix=NOPROBE
-// RUN: %clang -### %t.o -target x86_64-unknown-linux -flto -fpseudo-probe-for-profiling -fno-pseudo-probe-for-profiling 2>&1 | FileCheck %s --check-prefix=NOPROBE
-
-// PROBE: -plugin-opt=pseudo-probe-for-profiling
-// NOPROBE-NOT: -plugin-opt=pseudo-probe-for-profiling
More information about the cfe-commits
mailing list