[mlir] Extended BufferPlacement to support more sophisticated scenarios in which
authorMarcel Koester <marcel.koester@dfki.de>
Wed, 6 May 2020 13:06:19 +0000 (15:06 +0200)
committerMarcel Koester <marcel.koester@dfki.de>
Mon, 15 Jun 2020 10:19:23 +0000 (12:19 +0200)
commitff4c51033766ea4b60a4633fdfb57d305330c6fa
tree92195bc24d3652e737c626902d067b3f41340d4c
parent550c4562d18a6ab6ce60a062dceb163313da0ddd
[mlir] Extended BufferPlacement to support more sophisticated scenarios in which
allocations cannot be moved freely and can remain in divergent control flow.

The current BufferPlacement pass does not support allocation nodes that carry
additional dependencies (like in the case of dynamic shaped types). These
allocations can often not be moved freely and in turn might remain in divergent
control-flow branches. This requires a different strategy with respect to block
arguments and aliases. This CL adds additinal functionality to support
allocation nodes in divergent control flow while avoiding memory leaks.

Differential Revision: https://reviews.llvm.org/D79850
mlir/lib/Transforms/BufferPlacement.cpp
mlir/test/Transforms/buffer-placement.mlir