buffer-deallocation: consider aliases introduced by arith.select.
authorJohannes Reifferscheid <jreiffers@google.com>
Tue, 23 Aug 2022 12:21:40 +0000 (14:21 +0200)
committerJohannes Reifferscheid <jreiffers@google.com>
Tue, 23 Aug 2022 12:37:02 +0000 (14:37 +0200)
commit27a1a85662e68e96eeba0732f92ac61b2bbde9c3
treede8fc9e2c6418d3bec13c7958c0fb650c8f7c183
parentb12e5c884f068cc79054ead44f4688978215c16a
buffer-deallocation: consider aliases introduced by arith.select.

Currently, buffer deallocation considers arith.select to be
non-aliasing, which results in deallocs being inserted incorrectly. Since
arith.select doesn't implement any useful interfaces, this change just handles
it explicitly. Eventually this should probably be fixed properly, if this pass
is going to be used long term.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D132460
mlir/lib/Analysis/BufferViewFlowAnalysis.cpp
mlir/lib/Analysis/CMakeLists.txt
mlir/test/Dialect/Bufferization/Transforms/buffer-deallocation.mlir
utils/bazel/llvm-project-overlay/mlir/BUILD.bazel