[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)
Alexey Bader via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 23 22:16:37 PDT 2024
================
@@ -4867,12 +4946,13 @@ Action *Driver::ConstructPhaseAction(
return C.MakeAction<BackendJobAction>(Input, Output);
}
if (Args.hasArg(options::OPT_emit_llvm) ||
- (((Input->getOffloadingToolChain() &&
- Input->getOffloadingToolChain()->getTriple().isAMDGPU()) ||
- TargetDeviceOffloadKind == Action::OFK_HIP) &&
- (Args.hasFlag(options::OPT_fgpu_rdc, options::OPT_fno_gpu_rdc,
- false) ||
- TargetDeviceOffloadKind == Action::OFK_OpenMP))) {
+ (TargetDeviceOffloadKind == Action::OFK_SYCL ||
+ (((Input->getOffloadingToolChain() &&
+ Input->getOffloadingToolChain()->getTriple().isAMDGPU()) ||
+ TargetDeviceOffloadKind == Action::OFK_HIP) &&
+ (Args.hasFlag(options::OPT_fgpu_rdc, options::OPT_fno_gpu_rdc,
+ false) ||
+ TargetDeviceOffloadKind == Action::OFK_OpenMP)))) {
----------------
bader wrote:
```suggestion
TargetDeviceOffloadKind == Action::OFK_SYCL ||
(((Input->getOffloadingToolChain() &&
Input->getOffloadingToolChain()->getTriple().isAMDGPU()) ||
TargetDeviceOffloadKind == Action::OFK_HIP) &&
(Args.hasFlag(options::OPT_fgpu_rdc, options::OPT_fno_gpu_rdc,
false) ||
TargetDeviceOffloadKind == Action::OFK_OpenMP))) {
```
I think we can drop one pair of `()`.
https://github.com/llvm/llvm-project/pull/107493
More information about the llvm-commits
mailing list