[PATCH] D146720: [AMDGPU][printf] Run AMDGPUPrintfRuntimeBindingPass in -O0

Juan Manuel Martinez CaamaƱo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 06:54:28 PDT 2023


jmmartinez created this revision.
Herald added subscribers: kosarev, foad, kerbowa, hiraditya, Anastasia, tpr, dstuttard, yaxunl, jvesely, kzhuravl, arsenm.
Herald added a project: All.
jmmartinez requested review of this revision.
Herald added subscribers: llvm-commits, jplehr, pcwang-thead, sstefan1, wdng.
Herald added a reviewer: jdoerfert.
Herald added a project: LLVM.

AMDGPUPrintfRuntimeBindingPass is not run in the IR optimization
pipeline with -O0.

This means that with OpenCL the printf definition coming from
device_libs gets linked with the user's code, which blocks
AMDGPUPrintfRuntimeBindingPass from working after the linkage is done.

This patch also adds an opt-pipeline.ll test inspired from
llc-pipeline.ll to document the optimization pipeline.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146720

Files:
  llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
  llvm/test/CodeGen/AMDGPU/opencl-printf-pipeline.ll
  llvm/test/CodeGen/AMDGPU/opt-pipeline.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146720.507727.patch
Type: text/x-patch
Size: 40248 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230323/8665e783/attachment.bin>


More information about the llvm-commits mailing list