[mlir][memref] Extend multi-buffering transform
authorKirsten Lee <kile@microsoft.com>
Mon, 3 Oct 2022 18:40:05 +0000 (18:40 +0000)
committerThomas Raoux <thomasraoux@google.com>
Mon, 3 Oct 2022 18:45:38 +0000 (18:45 +0000)
commita8aeb651cdae4e687500575108e12c89e540f59c
tree41be7aabe17aea87250139b7ef35edbc7ae2af93
parent7f9c264b3c7f7806fac1028f604abb2c57ced3b8
[mlir][memref] Extend multi-buffering transform

Extend multi-buffering to simplify the affine map created if any of its operands are constants. This avoids downstream problems where more complex affine.apply operations cannot be expanded.
Transfer attributes from the old allocation to the new allocation.

Reviewed By: ThomasRaoux

Differential Revision: https://reviews.llvm.org/D134894
mlir/lib/Dialect/MemRef/Transforms/MultiBuffer.cpp
mlir/test/Dialect/MemRef/multibuffer.mlir
mlir/test/Dialect/MemRef/transform-ops.mlir