[all-commits] [llvm/llvm-project] 8037de: [mlir][memref] Add pass to expand realloc operatio...

Martin Erhart via All-commits all-commits at lists.llvm.org
Tue Sep 5 01:59:43 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8037deb7afb188242fbd61ab93f01bfd67387cd1
      https://github.com/llvm/llvm-project/commit/8037deb7afb188242fbd61ab93f01bfd67387cd1
  Author: Martin Erhart <merhart at google.com>
  Date:   2023-09-05 (Tue, 05 Sep 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/MemRef/Transforms/Passes.h
    M mlir/include/mlir/Dialect/MemRef/Transforms/Passes.td
    M mlir/include/mlir/Dialect/MemRef/Transforms/Transforms.h
    M mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
    M mlir/lib/Dialect/MemRef/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/MemRef/Transforms/ExpandRealloc.cpp
    M mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
    M mlir/test/Conversion/MemRefToLLVM/convert-dynamic-memref-ops.mlir
    M mlir/test/Conversion/MemRefToLLVM/convert-static-memref-ops.mlir
    M mlir/test/Conversion/MemRefToLLVM/typed-pointers.mlir
    A mlir/test/Dialect/MemRef/expand-realloc.mlir
    M mlir/test/Integration/Dialect/Vector/CPU/test-realloc.mlir
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  -----------
  [mlir][memref] Add pass to expand realloc operations, simplify lowering to LLVM

There are two motivations for this change:
1. It considerably simplifies adding support for the realloc operation to the
   new buffer deallocation pass by lowering the realloc such that no
   deallocation operation is inserted and the deallocation pass itself can
   insert that dealloc
2. The lowering is expressed on a higher level and thus easier to understand,
   and the lowerings of the memref operations it is composed of don't have to
   be duplicated in the MemRefToLLVM lowering (also see discussion in
   https://reviews.llvm.org/D133424)

Reviewed By: springerm

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




More information about the All-commits mailing list