Skip to content

Commit c0ae55b

Browse files
committed
Disable DAE for CUDA
1 parent ba7baaa commit c0ae55b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4125,7 +4125,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
41254125
}
41264126
// Turn on Dead Parameter Elimination Optimization with early optimizations
41274127
if (Args.hasFlag(options::OPT_fsycl_early_optimizations,
4128-
options::OPT_fno_sycl_early_optimizations, true))
4128+
options::OPT_fno_sycl_early_optimizations,
4129+
!RawTriple.isNVPTX()))
41294130
CmdArgs.push_back("-fenable-sycl-dae");
41304131

41314132
// Pass the triple of host when doing SYCL
@@ -7813,7 +7814,8 @@ void SYCLPostLink::ConstructJob(Compilation &C, const JobAction &JA,
78137814

78147815
// Turn on Dead Parameter Elimination Optimization with early optimizations
78157816
if (TCArgs.hasFlag(options::OPT_fsycl_early_optimizations,
7816-
options::OPT_fno_sycl_early_optimizations, true))
7817+
options::OPT_fno_sycl_early_optimizations,
7818+
!getToolChain().getTriple().isNVPTX()))
78177819
addArgs(CmdArgs, TCArgs, {"-emit-param-info"});
78187820
if (JA.getType() == types::TY_LLVM_BC) {
78197821
// single file output requested - this means only perform necessary IR

0 commit comments

Comments
 (0)