[clang] [llvm] Reland - [Driver][SYCL] Add initial SYCL offload compilation support … (PR #117268)
Michael Toguchi via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 22 10:06:59 PST 2024
================
@@ -6591,6 +6681,18 @@ const ToolChain &Driver::getOffloadingDeviceToolChain(
HostTC, Args);
break;
}
+ case Action::OFK_SYCL:
+ switch (Target.getArch()) {
+ case llvm::Triple::spir:
+ case llvm::Triple::spir64:
+ case llvm::Triple::spirv32:
+ case llvm::Triple::spirv64:
+ TC = std::make_unique<toolchains::SYCLToolChain>(*this, Target, HostTC,
+ Args);
+ break;
+ default:
+ break;
+ }
default:
break;
----------------
mdtoguchi wrote:
I followed the `OFK_HIP` usage here and added an assert if `TC` isn't populated. https://github.com/llvm/llvm-project/blob/3fdc74687dbf6da831a1c27995d9d7fef3a2a51f/clang/lib/Driver/Driver.cpp#L1063
https://github.com/llvm/llvm-project/pull/117268
More information about the llvm-commits
mailing list