[AMDGPU] Printf runtime binding pass
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Mon, 12 Aug 2019 17:12:29 +0000 (17:12 +0000)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Mon, 12 Aug 2019 17:12:29 +0000 (17:12 +0000)
commit4c9c98f36b64f35d271a1dc9d31baa9fa441878c
treeb3a67e04b96d230c547a153f7aa824bf3c9e0455
parentcb282b4ebcc6dfdad55581464cd72abb0fec9cc4
[AMDGPU] Printf runtime binding pass

This pass is a port of the according pass from the HSAIL compiler.
It parses printf calls and setup runtime printf buffer.
After that it copies printf arguments to the buffer and fills in
module metadata for runtime.

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

llvm-svn: 368592
llvm/lib/Analysis/TargetLibraryInfo.cpp
llvm/lib/Target/AMDGPU/AMDGPU.h
llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp [new file with mode: 0644]
llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
llvm/lib/Target/AMDGPU/CMakeLists.txt
llvm/test/CodeGen/AMDGPU/opencl-printf.ll [new file with mode: 0644]