[mlir][SCF] Add tensor.dim(scf.foreach_thread) folding
authorMatthias Springer <springerm@google.com>
Tue, 22 Nov 2022 10:20:41 +0000 (11:20 +0100)
committerMatthias Springer <springerm@google.com>
Tue, 22 Nov 2022 10:28:27 +0000 (11:28 +0100)
commit0d9761d50e738163c87d84a4328bc0a827ac8f34
tree77f73f579ce5c02c10a2d169ec16262dcc67aa95
parenta3c3e59ca5be12a39882aab87ddc23d5146cbcbc
[mlir][SCF] Add tensor.dim(scf.foreach_thread) folding

Dim sizes of `scf.foreach_thread` op results match the dim sizes of their respective tied shared_outs operands.

Differential Revision: https://reviews.llvm.org/D138484
mlir/include/mlir/Dialect/SCF/IR/SCFOps.td
mlir/lib/Dialect/SCF/IR/SCF.cpp
mlir/test/Dialect/SCF/canonicalize.mlir