@@ -3514,6 +3514,9 @@ class OffloadingActionBuilder final {
3514
3514
// / Flag to signal if the user requested device code split.
3515
3515
bool DeviceCodeSplit = false ;
3516
3516
3517
+ // / Flag to signal if DAE optimization is turned on.
3518
+ bool EnableDAE = false ;
3519
+
3517
3520
// / The SYCL actions for the current input.
3518
3521
ActionList SYCLDeviceActions;
3519
3522
@@ -3951,7 +3954,7 @@ class OffloadingActionBuilder final {
3951
3954
ActionList WrapperInputs;
3952
3955
// post link is not optional - even if not splitting, always need to
3953
3956
// process specialization constants
3954
- bool MultiFileActionDeps = !isSpirvAOT || DeviceCodeSplit;
3957
+ bool MultiFileActionDeps = !isSpirvAOT || DeviceCodeSplit || EnableDAE ;
3955
3958
types::ID PostLinkOutType = isNVPTX || !MultiFileActionDeps
3956
3959
? types::TY_LLVM_BC
3957
3960
: types::TY_Tempfiletable;
@@ -4108,6 +4111,9 @@ class OffloadingActionBuilder final {
4108
4111
WrapDeviceOnlyBinary = Args.hasArg (options::OPT_fsycl_link_EQ);
4109
4112
auto *DeviceCodeSplitArg =
4110
4113
Args.getLastArg (options::OPT_fsycl_device_code_split_EQ);
4114
+ EnableDAE =
4115
+ Args.hasFlag (options::OPT_fsycl_early_optimizations,
4116
+ options::OPT_fno_sycl_early_optimizations, true );
4111
4117
// -fsycl-device-code-split is an alias to
4112
4118
// -fsycl-device-code-split=per_source
4113
4119
DeviceCodeSplit = DeviceCodeSplitArg &&
0 commit comments