[all-commits] [llvm/llvm-project] 12ce9f: [mlir][spirv] Add client-api option to -convert-sp...

vic via All-commits all-commits at lists.llvm.org
Thu Aug 24 01:49:14 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 12ce9fd1248c6321b343601c1a2468ac7e00c9da
      https://github.com/llvm/llvm-project/commit/12ce9fd1248c6321b343601c1a2468ac7e00c9da
  Author: Victor Perez <victor.perez at codeplay.com>
  Date:   2023-08-24 (Thu, 24 Aug 2023)

  Changed paths:
    M mlir/include/mlir/Conversion/Passes.td
    M mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVM.h
    M mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVMPass.h
    M mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
    M mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVMPass.cpp
    A mlir/test/Conversion/SPIRVToLLVM/spirv-storage-class-mapping-unsupported.mlir
    A mlir/test/Conversion/SPIRVToLLVM/spirv-storage-class-mapping.mlir

  Log Message:
  -----------
  [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 at codeplay.com>

Reviewed By: antiagainst, kuhar

Differential Revision: https://reviews.llvm.org/D158627




More information about the All-commits mailing list