[all-commits] [llvm/llvm-project] 5c9863: [MLIR][SPIRVToLLVM] Conversion of SPIR-V variable op

George Mitenkov via All-commits all-commits at lists.llvm.org
Fri Jul 24 05:50:40 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5c98631391fa1c7315a687da853a776955d1531e
      https://github.com/llvm/llvm-project/commit/5c98631391fa1c7315a687da853a776955d1531e
  Author: George Mitenkov <georgemitenk0v at gmail.com>
  Date:   2020-07-24 (Fri, 24 Jul 2020)

  Changed paths:
    M mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp
    A mlir/test/Conversion/SPIRVToLLVM/memory-ops-to-llvm.mlir

  Log Message:
  -----------
  [MLIR][SPIRVToLLVM] Conversion of SPIR-V variable op

The patch introduces the conversion pattern for function-level
`spv.Variable`. It is modelled as `llvm.alloca` op. If initialized, then
additional store instruction is used. Note that there is no initialization
for arrays and structs since constants of these types are not supported in
LLVM dialect yet. Also, at the moment initialisation is only possible via
`spv.constant` (since `spv.GlobalVariable` conversion is not implemented
yet).

The input code has some scoping is not taken into account and will be
addressed in a different patch.

Reviewed By: ftynse

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




More information about the All-commits mailing list