[clang] [CIR][AMDGPU] Route printf in device code through the OpenCL runtime (PR #226435)

Steffen Larsen via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 28 04:40:23 PDT 2026


================
@@ -173,6 +173,7 @@ void registerToLLVMTranslation() {
                                                       enableOpenMP);
         if (!llvmModule)
           return mlir::failure();
+        cir::direct::expandAMDGPUDevicePrintf(*llvmModule);
----------------
steffenlarsen wrote:

I had it there in my first iteration of this change, though I decided against it as it seemed out-of-place for post-transformation cleanup. That said, I now wonder if the current is much better.

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


More information about the cfe-commits mailing list