[clang] [HIP][SPIRV] Enable the SPIRV backend instead of the translator through an experimental flag. (PR #162282)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 16 06:46:48 PDT 2025


================
@@ -3672,29 +3672,45 @@ class OffloadingActionBuilder final {
             // compiler phases, including backend and assemble phases.
             ActionList AL;
             Action *BackendAction = nullptr;
+            bool AssembleAndLink = true;
             if (ToolChains.front()->getTriple().isSPIRV() ||
----------------
jhuber6 wrote:

SPIR-V here should be similar to what CUDA does, I would just expect to skip this step entirely. I'm fairly certain the normal pipeline works for SPIR-V since the standalone clang target does what I expect. The linker is probably the only bit you'd skip, the handling there is a little weird since CUDA overloads it to mean `fatbinary` while HIP uses the offload bundler (for now).

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


More information about the cfe-commits mailing list