[PATCH] D104858: [OpenCL][ARM] Fix ICE when compiling a kernel

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 6 09:55:26 PDT 2021


Anastasia added a comment.

In D104858#2859742 <https://reviews.llvm.org/D104858#2859742>, @pekka.jaaskelainen wrote:

>> Ok, thanks for clarification. Does it mean there is something we need to add to LLVM somewhere to make it work correctly? Would it be specific to Arm or generally for all CPU targets?
>
> To my understanding, what is required is to keep SPIR_KERNEL CC working for Arm since that is the generic way for PoCL supports clSetKernelArg for CPU targets by default. I have been under impression that it has worked so far for Arm, but I haven't tested it personally, and PoCL still lacks an official Arm maintainer, so cannot say for sure.

Ok, but as is clang can't compile OpenCL sources

In D104858#2859742 <https://reviews.llvm.org/D104858#2859742>, @pekka.jaaskelainen wrote:

>> Ok, thanks for clarification. Does it mean there is something we need to add to LLVM somewhere to make it work correctly? Would it be specific to Arm or generally for all CPU targets?
>
> To my understanding, what is required is to keep SPIR_KERNEL CC working for Arm since that is the generic way for PoCL supports clSetKernelArg for CPU targets by default. I have been under impression that it has worked so far for Arm, but I haven't tested it personally, and PoCL still lacks an official Arm maintainer, so cannot say for sure.

Well right now clang doesn't seem to cope with `SPIR_KERNEL` for Arm CPU as it crashes its instruction selection https://godbolt.org/z/rraG9roee. So the flow is definitely broken. And if we fix the failure we can use this properly in godbolt instead of working around by removing the kernel in the preprocessor.


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

https://reviews.llvm.org/D104858



More information about the cfe-commits mailing list