[mlir][bufferization] Add DeallocationSimplification pass
Adds a pass that can be run after buffer deallocation to simplify the deallocation operations. In particular, there are patterns that need alias information and thus cannot be added as a regular canonicalization pattern. This initial commit moves an incorrect canonicalization pattern from over to this new pass and fixes it by querying the alias analysis for the additional information it needs to be correct (there must not by any potential aliasing memref in the retain list other than the currently mached one). Also, improves this pattern by considering the `extract_strided_metadata` operation which is inserted by the deallocation pass by default. Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D157398
Loading
Please sign in to comment