[PATCH] D45187: [AMDGPU] Fix lowering enqueue_kernel

Yaxun Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 2 14:46:33 PDT 2018


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

Two issues were fixed:

1. runtime has difficulty to allocate memory for an external symbol of a

kernel set the address of the external symbol, therefore make the runtime
handle of enqueued kernel an ordinary global variable. Runtime only needs
to store the address of the loaded kernel to the handle and has verified
that this approach works.

2. handle the situation where `__enqueue_kernel*` gets inlined therefore

the enqueued kernel may be used through a constant expr instead
of an instruction.


https://reviews.llvm.org/D45187

Files:
  lib/Target/AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp
  test/CodeGen/AMDGPU/enqueue-kernel.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45187.140692.patch
Type: text/x-patch
Size: 4758 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180402/95ba83f1/attachment.bin>


More information about the llvm-commits mailing list