[PATCH] D66430: [AMDGPU] Kernel calls lowering

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 11:11:49 PDT 2019


rampitec added a comment.

In D66430#1635667 <https://reviews.llvm.org/D66430#1635667>, @arsenm wrote:

> In D66430#1635664 <https://reviews.llvm.org/D66430#1635664>, @rampitec wrote:
>
> > In D66430#1635654 <https://reviews.llvm.org/D66430#1635654>, @arsenm wrote:
> >
> > > This pass should be removed. Clang needs to emit a separate function body up-front. I want the IR verifier to reject all calls to kernels. Since a module may need to export a callable function with the name of the kernel, this has a name mangling impact that the frontend needs to take care of
> >
> >
> > I agree in general. However, we do not support late linking so far but do support OpenCL. Is there any reason to keep this pass even as a temporary solution in the private branch?
>
>
> I can't imagine the clang patch is a lot of work, but nobody's ever done it. Ignoring the name mangling problem, it shouldn't be difficult to just emit the two separate functions directly


I do not think there is a mangling problem. Prefix "__" is reserved for internal use. But then again, even if you do it in clang we will internalize the function. You will end up in the same situation.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66430/new/

https://reviews.llvm.org/D66430





More information about the llvm-commits mailing list