[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 13 00:08:31 PDT 2025
arsenm wrote:
> @lalaniket8 @arsenm I don't have a strong opinion, but shouldn't this transformation be done during lowering to the target?
This is the lowering to the target.
> Current version of the patch brings odd behavior for LLVM IR to SPIR-V lowering for OpenCL kernels. SPIR-V don't allow one EntryPoint to refer another EntryPoint,
Yes, that's the entire point of this change. We've avoided introducing the invalid situation of an entry calling another entry, which requires 2 IR function bodies with different calling conventions. The calling convention is getting set incorrectly on the implementation function if you see an entry calling another entry
https://github.com/llvm/llvm-project/pull/115821
More information about the cfe-commits
mailing list