[mlir] Refactored BufferPlacement transformation.
authorMarcel Koester <marcel.koester@dfki.de>
Wed, 16 Sep 2020 10:31:08 +0000 (12:31 +0200)
committerMarcel Koester <marcel.koester@dfki.de>
Mon, 19 Oct 2020 10:52:16 +0000 (12:52 +0200)
commit1b1c61ff47f8263680cbbf48f7d95f8bddd2386e
tree7dcab559d2625f9c5b71a0517929bfe62215ba10
parent3dd2f02bb08534bc537f32ad1154773d6710ece9
[mlir] Refactored BufferPlacement transformation.

The current BufferPlacement transformation contains several concepts for
hoisting allocations. However, more advanced hoisting techniques should not be
integrated into the BufferPlacement transformation. Hence, this CL refactors the
current BufferPlacement pass into three separate pieces: BufferDeallocation and
BufferAllocation(Loop)Hoisting. Moreover, it extends the hoisting functionality
by allowing to move allocations out of loops.

Differential Revision: https://reviews.llvm.org/D87756
mlir/include/mlir/Transforms/Bufferize.h
mlir/include/mlir/Transforms/Passes.h
mlir/include/mlir/Transforms/Passes.td
mlir/lib/Transforms/BufferDeallocation.cpp [moved from mlir/lib/Transforms/BufferPlacement.cpp with 58% similarity]
mlir/lib/Transforms/BufferOptimizations.cpp [new file with mode: 0644]
mlir/lib/Transforms/CMakeLists.txt
mlir/test/Dialect/Linalg/bufferize.mlir
mlir/test/Transforms/buffer-deallocation.mlir [moved from mlir/test/Transforms/buffer-placement.mlir with 78% similarity]
mlir/test/Transforms/buffer-hoisting.mlir [new file with mode: 0644]
mlir/test/Transforms/buffer-loop-hoisting.mlir [new file with mode: 0644]