Fixed bug in buffer deallocation pass using unranked memref types.
authorJulian Gross <julian.gross@dfki.de>
Mon, 3 May 2021 14:59:59 +0000 (16:59 +0200)
committerJulian Gross <julian.gross@dfki.de>
Mon, 10 May 2021 08:50:29 +0000 (10:50 +0200)
commitfc253e69f9b988e8b2d4c940946146696b2acf5a
treec5ef66470e1402b0dc1c1a59dcccc97fd56df01e
parent831cf15ca6892e2044447f8dc516d76b8a827f1e
Fixed bug in buffer deallocation pass using unranked memref types.

In the buffer deallocation pass, unranked memref types are not properly supported.
After investigating this issue, it turns out that the Clone and Dealloc operation
does not support unranked memref types in the current implementation.
This patch adds the missing feature and enables the transformation of any memref
type.

This patch solves this bug: https://bugs.llvm.org/show_bug.cgi?id=48385

Differential Revision: https://reviews.llvm.org/D101760
mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
mlir/test/Conversion/StandardToSPIRV/alloc.mlir
mlir/test/Dialect/MemRef/ops.mlir
mlir/test/Transforms/buffer-deallocation.mlir
mlir/test/lib/Dialect/Test/TestOps.td