You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preserve byval/sret typed pointer semantics with SPV_KHR_untyped_pointers (#3417)
Avoid translation of pointer function arguments with `byval`/`sret`
attribute as untyped pointers to preserve the information about the
pointer element type.
Insert `OpBitcast` to further use such pointers in the untyped pointer
semantics (vise-versa bitcast instructions are explicitly allowed by the
[SPV_KHR_untyped_pointers
](https://github.khronos.org/SPIRV-Registry/extensions/KHR/SPV_KHR_untyped_pointers.html)
extension).
This approach ensures valid reverse translation and correct OpenCL
runtime behavior, especially for kernels translation.
Without the fix `clSetKernelArg()` fails with `CL_INVALID_MEM_OBJECT`
error.
Original commit:
KhronosGroup/SPIRV-LLVM-Translator@b65c96eeec4e2b3
0 commit comments