[all-commits] [llvm/llvm-project] 778494: [mlir][bufferization] Add bufferization.dealloc ca...

Martin Erhart via All-commits all-commits at lists.llvm.org
Mon Aug 28 01:04:30 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 778494ae07ec4d2429d93e8b969f9865b82423c0
  Author: Martin Erhart <merhart at google.com>
  Date:   2023-08-28 (Mon, 28 Aug 2023)

  Changed paths:
    M mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
    M mlir/test/Dialect/Bufferization/canonicalize.mlir

  Log Message:
  [mlir][bufferization] Add bufferization.dealloc canonicalizer to remove unused alloc-dealloc pairs

Deallocation operations where the allocated value is the 'memref' and
'retained' list are currently not supported. This is because when values
are in the retained list, they typically have a use-site at a later
point and another deallocation op exists at that later point to free the
memref then. There alrady exists a canonicalization pattern in the
buffer deallocation simplification pass that removes the allocated value
from the earlier dealloc because it will never be actually deallocated
in that case and thus does not have to be considered in this new

Differential Revision: https://reviews.llvm.org/D158740

  Commit: fff183050adbd2c1f2e7fe78055a75aadb1694bb
  Author: Martin Erhart <merhart at google.com>
  Date:   2023-08-28 (Mon, 28 Aug 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Bufferization/IR/Bufferization.h
    M mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
    M mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocationSimplification.cpp
    M mlir/test/Dialect/Bufferization/Transforms/buffer-deallocation-simplification.mlir

  Log Message:
  [mlir][bufferization] Run the simple dealloc canonicalization patterns as part of BufferDeallocationSimplification

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D158744

Compare: https://github.com/llvm/llvm-project/compare/ad7e2501000d...fff183050adb

More information about the All-commits mailing list