[Mlir-commits] [clang] [flang] [mlir] [Flang][Driver] Add support for '-fprofile-sample-use' option (PR #188697)
Kaviya Rajendiran
llvmlistbot at llvm.org
Tue Mar 31 20:43:10 PDT 2026
================
@@ -1103,24 +1133,8 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA,
Args.addAllArgs(
CmdArgs, {options::OPT_fprofile_generate, options::OPT_fprofile_use_EQ});
- if (!(IsCudaDevice || IsHIPDevice)) {
- // recognise options: -fprofile-sample-use= and -fno-profile-sample-use=
- if (Arg *A = getLastProfileSampleUseArg(Args)) {
-
- auto *PGOArg = Args.getLastArg(options::OPT_fprofile_generate,
- options::OPT_fprofile_generate_EQ);
-
- if (PGOArg) {
- D.Diag(diag::err_drv_argument_not_allowed_with)
- << PGOArg->getAsString(Args) << A->getAsString(Args);
- }
-
- StringRef fname = A->getValue();
- if (!llvm::sys::fs::exists(fname))
- D.Diag(diag::err_drv_no_such_file) << fname;
- else
- A->render(Args, CmdArgs);
- }
+ if (!Triple.isNVPTX()) {
----------------
kaviya2510 wrote:
You are correct. This check is not required as already had a check for `JA.isDeviceOffloading(Action::OFK_Cuda);`
https://github.com/llvm/llvm-project/pull/188697
More information about the Mlir-commits
mailing list