OSDN Git Service

[mlir][spirv] Adapt subview legalization to the updated op semantics.
authorMaheshRavishankar <ravishankarm@google.com>
Wed, 20 May 2020 18:48:22 +0000 (11:48 -0700)
committerMaheshRavishankar <ravishankarm@google.com>
Wed, 20 May 2020 19:00:21 +0000 (12:00 -0700)
commit0e88eb5c514ab59d63c7503b6055a2ced62a870b
tree85029c676eb7fb91c99f6f5fa929bfd8f4507b11
parent55430f53f397e942b91d8379b5dbae5d2c852986
[mlir][spirv] Adapt subview legalization to the updated op semantics.

The subview semantics changes recently to allow for more natural
representation of constant offsets and strides. The legalization of
subview op for lowering to SPIR-V needs to account for this.
Also change the linearization to use the strides from the affine map
of a memref.

Differential Revision: https://reviews.llvm.org/D80270
mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
mlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
mlir/test/Conversion/GPUToSPIRV/load-store.mlir
mlir/test/Conversion/GPUToSPIRV/loop.mlir
mlir/test/Conversion/StandardToSPIRV/subview-to-spirv.mlir