[clang] [llvm] [WIP][AMDGPU] Enable hostcall printf for OpenCL (PR #70932)

Vikram Hegde via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 1 23:36:21 PDT 2023


vikramRH wrote:

@arsenm, The choice of defaults is based on current state of printf.  HIP uses hostcalls and OpenCL uses buffered variant by default. However I'm willing to make one of the two variants consistent (preferably hostcalls for me). Do note that this would make all OpenCL printf to be lowered to hostcalls from this patch onwards. @b-sumner , are you okay with this ?

Also regarding point 2, The current behaviour is that with HIP,  printf is lowered at clang CodeGen (since it treats printf to be a builtin) while OpenCL uses the IR pass. This patch will make it so that we could remove the IR pass and handle all lowering at clang CodeGen

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


More information about the cfe-commits mailing list