[PATCH] D127579: [clang][WIP] add option to keep types of ptr args for non-kernel functions in metadata

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 16 05:50:43 PDT 2022


Anastasia added a comment.

In D127579#3588651 <https://reviews.llvm.org/D127579#3588651>, @bader wrote:

>> The way I understand a bitcast instruction in SPIR-V (`OpBitcast` in https://www.khronos.org/registry/SPIR-V/specs/unified1/SPIRV.html#_conversion_instructions) is that it can only apply to pointer types which are distinct from function types. Note that I believe that function pointers are illegal, at least we disallow them in OpenCL.
>
> FYI: we are experimenting with function pointers on Intel HW programmed via SPIR-V. Extension draft - https://github.com/intel/llvm/blob/sycl/sycl/doc/design/spirv-extensions/SPV_INTEL_function_pointers.asciidoc.

Ok, I see. That confirms I am guessing that in the standard SPIR-V binary we won't be able to apply LLVM IR's trick.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127579



More information about the cfe-commits mailing list