aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
diff options
context:
space:
mode:
authorMatthias Springer <me@m-sp.org>2023-11-01 10:26:31 +0900
committerGitHub <noreply@github.com>2023-11-01 10:26:31 +0900
commit1abd8d1a8d962a14ca96e19c0f6da4f9ac394d0a (patch)
tree33060830e9aa986ba974e6512321d5245e7b33a1 /mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
parent8b91de5d6a3f98dcc00bbd286e339e512f7e3682 (diff)
downloadllvm-1abd8d1a8d962a14ca96e19c0f6da4f9ac394d0a.zip
llvm-1abd8d1a8d962a14ca96e19c0f6da4f9ac394d0a.tar.gz
llvm-1abd8d1a8d962a14ca96e19c0f6da4f9ac394d0a.tar.bz2
[mlir][Interfaces] Add `SubsetOpInterface` and `SubsetExtractionOpInterface` (#70617)
There is currently an op interface for subset insertion ops (`SubsetInsertionOpInterface`), but not for subset extraction ops. This commit adds `SubsetExtractionOpInterface` to `mlir/Interfaces`, as well as a common dependent op interface: `SubsetOpInterface`. - `SubsetOpInterface` is for ops that operate on tensor subsets. It provides interface methods to check if two subset ops operate on equivalent or disjoint subsets. Ops that implement this interface must implement either `SubsetExtractionOpInterface` or `SubsetInsertionOpInterface`. - `SubsetExtractionOpInterface` is for ops that extract from a tensor at a subset. E.g., `tensor.extract_slice`, `tensor.gather`, `vector.transfer_read`. Current implemented only on `tensor.extract_slice`. - `SubsetInsertionOpInterface` is for ops that insert into a destination tensor at a subset. E.g., `tensor.insert_slice`, `tensor.parallel_insert_slice`, `tensor.scatter`, `vector.transfer_write`. Currently only implemented on `tensor.insert_slice`, `tensor.parallel_insert_slice`. Other changes: - Rename `SubsetInsertionOpInterface.td` to `SubsetOpInterface.td`. - Add helper functions to `ValueBoundsOpInterface.cpp` for checking whether two slices are disjoint. The new interfaces will be utilized by a new "loop-invariant subset hoisting" transformation. (This new transform is roughly what `Linalg/Transforms/SubsetHoisting.cpp` is doing, but in a generic and interface-driven way.)
Diffstat (limited to 'mlir/lib/Transforms/LoopInvariantCodeMotion.cpp')
0 files changed, 0 insertions, 0 deletions