[MLIR] Fix non-deterministic generation from buffer-deallocation pass
authorUday Bondhugula <uday@polymagelabs.com>
Thu, 9 Feb 2023 22:38:39 +0000 (04:08 +0530)
committerUday Bondhugula <uday@polymagelabs.com>
Thu, 9 Feb 2023 23:21:59 +0000 (04:51 +0530)
commite6edc1bd69c881eabf78c439be7f42a639f0df79
tree174454325a97b576a7cce93061db3f01516920ea
parent68c906811bcb1edfc1a4c73e0fcadb51f7f3e8e3
[MLIR] Fix non-deterministic generation from buffer-deallocation pass

The buffer-deallocation pass generates a different output on each run
due to an unstable iteration order.

Fixes: https://github.com/llvm/llvm-project/issues/59118
Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D143622
mlir/include/mlir/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.h
mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocation.cpp
mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp