[PATCH] D66430: [AMDGPU] Kernel calls lowering

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 10:47:53 PDT 2019


rampitec created this revision.
rampitec added reviewers: msearles, kzhuravl.
Herald added subscribers: t-tye, Anastasia, tpr, dstuttard, yaxunl, mgorny, nhaehnle, wdng, jvesely, arsenm.

In OpenCL, a kernel may call another kernel as if it was a non-kernel
function. However, kernels and functions have different ABI. To fix this,
we copy the body of kernel A into a new non-kernel function fA, if we
encounter a call to A. All calls to A are then transferred to fA.


https://reviews.llvm.org/D66430

Files:
  lib/Target/AMDGPU/AMDGPU.h
  lib/Target/AMDGPU/AMDGPULowerKernelCalls.cpp
  lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
  lib/Target/AMDGPU/CMakeLists.txt
  test/CodeGen/AMDGPU/call-to-kernel-undefined.ll
  test/CodeGen/AMDGPU/call-to-kernel.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66430.215946.patch
Type: text/x-patch
Size: 8403 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190819/38654326/attachment.bin>


More information about the llvm-commits mailing list