[PATCH] D120566: [OpenCL][AMDGPU]: Do not allow a call to kernel
Matt Arsenault via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 25 07:16:06 PST 2022
arsenm added a comment.
In D120566#3345604 <https://reviews.llvm.org/D120566#3345604>, @yaxunl wrote:
> One of my concerns is that all kernels are duplicated which may cause code object size doubled.
Not really, the kernel should just be a stub that calls the real implementation function. In the real world this will always be inlined
> Do we need to make the clone always_inline and let the kernel call its clone to avoid duplicate function bodies? Or LLVM has some pass to do that?
It's not a special case, there's no real need to put always_inline. Nobody uses this feature in the real world anyway, and single use functions will be inlined
> Another concern is that the duplicate non-kernel functions have actual kernel ABI. Not sure if that can cause any issues.
My main question is how we have the symbol for the kernel and function coexist
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120566/new/
https://reviews.llvm.org/D120566
More information about the cfe-commits
mailing list