[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)
Alexey Bader via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 23 22:16:38 PDT 2024
================
@@ -767,6 +768,27 @@ Driver::OpenMPRuntimeKind Driver::getOpenMPRuntime(const ArgList &Args) const {
return RT;
}
+static const char *getDefaultSYCLArch(Compilation &C) {
+ // If -fsycl is supplied we will assume SPIR-V
+ if (C.getDefaultToolChain().getTriple().getArch() == llvm::Triple::x86)
----------------
bader wrote:
If I get it right, here we try to check the address size on the host to propagate the same size for the device compilation.
If so, I suggest we generalize it for more host targets:
```suggestion
if (C.getDefaultToolChain().getTriple().isArch32Bit())
```
https://github.com/llvm/llvm-project/pull/107493
More information about the cfe-commits
mailing list