[mlir] Move memref.subview patterns to MemRef/Transforms/
authorLei Zhang <antiagainst@google.com>
Mon, 12 Apr 2021 20:38:04 +0000 (16:38 -0400)
committerLei Zhang <antiagainst@google.com>
Mon, 12 Apr 2021 20:38:22 +0000 (16:38 -0400)
commit0deeaaca399b381ddccffde71c921e7636be7fdc
treef521d8976ff10dafcb9bddd3a3d17c25a05537a2
parent05df5c54e8e15a444f59c535b2935fc19a90579b
[mlir] Move memref.subview patterns to MemRef/Transforms/

These patterns have been used as a prerequisite step for lowering
to SPIR-V. But they don't involve SPIR-V dialect ops; they are
pure memref/vector op transformations. Given now we have a dedicated
MemRef dialect, moving them to Memref/Transforms/, which is a more
suitable place to host them, to allow used by others.

This commit just moves code around and renames patterns/passes
accordingly. CMakeLists.txt for existing MemRef libraries are
also improved along the way.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D100326
18 files changed:
mlir/include/mlir/Conversion/Passes.td
mlir/include/mlir/Conversion/StandardToSPIRV/StandardToSPIRV.h
mlir/include/mlir/Conversion/StandardToSPIRV/StandardToSPIRVPass.h
mlir/include/mlir/Dialect/MemRef/CMakeLists.txt
mlir/include/mlir/Dialect/MemRef/Transforms/CMakeLists.txt [new file with mode: 0644]
mlir/include/mlir/Dialect/MemRef/Transforms/Passes.h [new file with mode: 0644]
mlir/include/mlir/Dialect/MemRef/Transforms/Passes.td [new file with mode: 0644]
mlir/include/mlir/InitAllPasses.h
mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt
mlir/lib/Dialect/MemRef/CMakeLists.txt
mlir/lib/Dialect/MemRef/IR/CMakeLists.txt
mlir/lib/Dialect/MemRef/Transforms/CMakeLists.txt [new file with mode: 0644]
mlir/lib/Dialect/MemRef/Transforms/FoldSubViewOps.cpp [moved from mlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp with 84% similarity]
mlir/lib/Dialect/MemRef/Utils/CMakeLists.txt [new file with mode: 0644]
mlir/lib/Dialect/MemRef/Utils/MemRefUtils.cpp
mlir/test/Conversion/StandardToSPIRV/subview-to-spirv.mlir [deleted file]
mlir/test/Dialect/MemRef/fold-subview-ops.mlir [moved from mlir/test/Conversion/StandardToSPIRV/legalization.mlir with 98% similarity]
mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp