[mlir][spirv] Add client-api option to -convert-spirv-to-llvm
Option to express that `spirv` StorageClasses should be mapped to LLVM address spaces in the conversion process. This mapping will be client-dependent. The client API cannot be taken from the code as more than one module could be present, resulting in more than one VCE triple and different StorageClass to address space mappings. This information would not be available during type conversion. A specific mapping for the OpenCL client is defined, based on [the OpenCL Extended Instruction Set](https://registry.khronos.org/SPIR-V/specs/unified1/OpenCL.ExtendedInstructionSet.100.html#_binary_form) and [this mapping](https://github.com/llvm/llvm-project/blob/3edd338a6407d9410f6a283c5dc32ba676ac0b8f/clang/lib/Basic/Targets/SPIR.h#L27 ). Signed-off-by:Victor Perez <victor.perez@codeplay.com> Reviewed By: antiagainst, kuhar Differential Revision: https://reviews.llvm.org/D158627
Loading
Please sign in to comment