OSDN Git Service

[AMDGPU] Fix lowering enqueue kernel when kernel has no name
authorYaxun Liu <Yaxun.Liu@amd.com>
Mon, 12 Mar 2018 16:34:06 +0000 (16:34 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Mon, 12 Mar 2018 16:34:06 +0000 (16:34 +0000)
commitd4b84fce523d2d586573af0dc468452291c7f5ae
tree661519c32190f5fe834100a4a906c34250188cc1
parent2744a56d7978750fef064b3815a67eb408fb353b
[AMDGPU] Fix lowering enqueue kernel when kernel has no name

Since the enqueued kernels have internal linkage, their names may be dropped.
In this case, give them unique names __amdgpu_enqueued_kernel or
__amdgpu_enqueued_kernel.n where n is a sequential number starting from 1.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327291 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp
test/CodeGen/AMDGPU/enqueue-kernel.ll