[PATCH] D100598: [CUDA, FDO] Filter out profiling options from GPU-side compilations.
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 15 13:56:35 PDT 2021
tra 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)) {
----------------
@yaxunl Should I add isHipDevice here too? I don't think host-side profiling info is of much use for GPU compilation.
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