[all-commits] [llvm/llvm-project] b0688e: [mlir][bufferization] Add DeallocOp canonicalizer ...

Martin Erhart via All-commits all-commits at lists.llvm.org
Fri Jul 28 09:41:39 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b0688ed0dcb67b6582df3cbef0910257bb1f75f2
      https://github.com/llvm/llvm-project/commit/b0688ed0dcb67b6582df3cbef0910257bb1f75f2
  Author: Martin Erhart <merhart at google.com>
  Date:   2023-07-28 (Fri, 28 Jul 2023)

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

  Log Message:
  -----------
  [mlir][bufferization] Add DeallocOp canonicalizer to remove memrefs also present in the retained list

Since memrefs in the retained list will never be deallocated, we can remove them from the list of memrefs to be deallocated. If the list of memrefs to deallocate becomes empty, we can just delete the dealloc operation.

Reviewed By: springerm

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




More information about the All-commits mailing list