[PATCH] D110371: [CSSPGO] Do not pass -fpseudo-probe-for-profiling to the linker.

Hongtao Yu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 23 15:50:56 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe9d1a679a1c9: [CSSPGO] Do not pass -fpseudo-probe-for-profiling to the linker. (authored by hoy).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110371/new/

https://reviews.llvm.org/D110371

Files:
  clang/lib/Driver/ToolChains/CommonArgs.cpp
  clang/test/Driver/pseudo-probe-lto.c


Index: clang/test/Driver/pseudo-probe-lto.c
===================================================================
--- 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
Index: clang/lib/Driver/ToolChains/CommonArgs.cpp
===================================================================
--- clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -620,11 +620,6 @@
       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())


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110371.374685.patch
Type: text/x-patch
Size: 1839 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210923/a0e483e1/attachment-0001.bin>


More information about the cfe-commits mailing list