[PATCH] D100598: [CUDA, FDO] Filter out profiling options from GPU-side compilations.

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 15 14:07:49 PDT 2021


yaxunl added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5830
   // these by hand.
-  if (Arg *A = getLastProfileSampleUseArg(Args)) {
-    auto *PGOArg = Args.getLastArg(
-        options::OPT_fprofile_generate, options::OPT_fprofile_generate_EQ,
-        options::OPT_fcs_profile_generate, options::OPT_fcs_profile_generate_EQ,
-        options::OPT_fprofile_use, options::OPT_fprofile_use_EQ);
-    if (PGOArg)
-      D.Diag(diag::err_drv_argument_not_allowed_with)
-          << "SampleUse with PGO options";
+  if (!IsCudaDevice) {
+    if (Arg *A = getLastProfileSampleUseArg(Args)) {
----------------
tra wrote:
> @yaxunl Should I add isHipDevice here too? I don't think host-side profiling info is of much use for GPU compilation.
Yes pls do the same for HIP. Thanks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100598



More information about the cfe-commits mailing list