[all-commits] [llvm/llvm-project] 3463d9: [mlir][Linalg] Add a hoistViewAllocOps helper func...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Thu Jun 4 16:03:34 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3463d9835b02a2c1b22fabadb4ba1a175fea6dad
      https://github.com/llvm/llvm-project/commit/3463d9835b02a2c1b22fabadb4ba1a175fea6dad
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2020-06-04 (Thu, 04 Jun 2020)

  Changed paths:
    A mlir/include/mlir/Dialect/Linalg/Transforms/Hoisting.h
    M mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
    A mlir/test/Dialect/Linalg/hoisting.mlir
    M mlir/test/lib/Transforms/CMakeLists.txt
    A mlir/test/lib/Transforms/TestLinalgHoisting.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp

  Log Message:
  -----------
  [mlir][Linalg] Add a hoistViewAllocOps helper function

This revision adds a helper function to hoist alloc/dealloc pairs and
alloca op out of immediately enclosing scf::ForOp if both conditions are true:
   1. all operands are defined outside the loop.
   2. all uses are ViewLikeOp or DeallocOp.

This is now considered Linalg-specific and will be generalized on a per-need basis.

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




More information about the All-commits mailing list