[all-commits] [llvm/llvm-project] 8a2061: [AMDGPU] Respect `nobuiltin` when converting `printf`

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue Aug 22 10:48:34 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8a206124675aae7e5afc9577f651f8e88468ce43
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-08-22 (Tue, 22 Aug 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
    A llvm/test/CodeGen/AMDGPU/printf_builtin.ll
    A llvm/test/CodeGen/AMDGPU/printf_nobuiltin.ll

  Log Message:
  [AMDGPU] Respect `nobuiltin` when converting `printf`

The AMDGPU backend uses a pass to transform calls to the `printf`
function to a built-in verision for either HIP or OpenCL. Currently this
does not respect `-fno-builtin` and is always emitted. This allows the
user to turn off this functionality as is standard for these types of
built-in transformations. The motivation behind this change is to allow
the `libc` project to provide a linkable version of the `printf`
function in the future.

Reviewed By: sameerds

Differential Revision: https://reviews.llvm.org/D158477

More information about the All-commits mailing list