[all-commits] [llvm/llvm-project] 87f2de: [mlir][bufferization] Add DeallocationSimplificati...

Martin Erhart via All-commits all-commits at lists.llvm.org
Thu Aug 10 05:46:32 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 87f2dee423d283e584d55ea6169bd4b0be0246c0
      https://github.com/llvm/llvm-project/commit/87f2dee423d283e584d55ea6169bd4b0be0246c0
  Author: Martin Erhart <merhart at google.com>
  Date:   2023-08-10 (Thu, 10 Aug 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.h
    M mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.td
    M mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
    A mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocationSimplification.cpp
    M mlir/lib/Dialect/Bufferization/Transforms/CMakeLists.txt
    A mlir/test/Dialect/Bufferization/Transforms/buffer-deallocation-simplification.mlir
    M mlir/test/Dialect/Bufferization/canonicalize.mlir

  Log Message:
  -----------
  [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




More information about the All-commits mailing list