[clang] [flang] [llvm] [clang][flang][Triple][llvm] Add isOffload function to LangOpts and isGPU function to Triple (PR #126956)

Harald van Dijk via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 10 06:49:14 PDT 2025


hvdijk wrote:

> Seems reasonable so long as we know that `SPIR-V` is always a GPU. I'll defer to SPIR people.

It's not. SPIR-V is mostly-device-agnostic and implementations may run it on GPU, on CPU, or on any other device. I'm looking at this while trying to update 94229, I think `isGPU()` should return `false` for SPIR-V, and instead there should be checks for SYCL rather than for SPIR-V as non-SPIR-V SYCL targets need the same handling, does that sound reasonable to you?

https://github.com/llvm/llvm-project/pull/126956


More information about the cfe-commits mailing list