This is an archive of the discontinued LLVM Phabricator instance.

[mlir][NFC] Move SubTensorOp and SubTensorInsertOp to TensorDialect
ClosedPublic

Authored by springerm on Jun 21 2021, 6:08 PM.

Details

Summary

The main goal of this commit is to remove the dependency of Standard dialect on the Tensor dialect.

  • Rename SubTensorOp -> tensor.extract_slice, SubTensorInsertOp -> tensor.insert_slice.
  • Some helper functions are (already) duplicated between the Tensor dialect and the MemRef dialect. To keep this commit smaller, this will be cleaned up in a separate commit.
  • Additional dialect dependencies: Shape --> Tensor, Tensor --> Standard
  • Remove dialect dependencies: Standard --> Tensor
  • Move canonicalization test cases to correct dialect (Tensor/MemRef).

Note: This is a fixed version of https://reviews.llvm.org/D104499, which was reverted due to a missing update to two CMakeFile.txt.

Diff Detail