[clang] [clang][Driver] Support for the SPIR-V backend in the new driver when compiling HIP (PR #167543)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 20 06:30:19 PST 2025


================
@@ -5154,6 +5158,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
       rewriteKind = RK_Fragile;
     } else if (JA.getType() == types::TY_CIR) {
       CmdArgs.push_back("-emit-cir");
+    } else if (JA.getType() == types::TY_Image && IsAMDSPIRVForHIPDevice) {
----------------
jhuber6 wrote:

Can you explain this a bit more? The `image` type is a little weird I recall, I thought we mostly used it for bizarre things like fat binaries. If this is SPIR-V then wouldn't it be object or assembly?

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


More information about the cfe-commits mailing list