[all-commits] [llvm/llvm-project] 3adced: [mlir] Introduce callback-based builders to SCF Pa...

ftynse via All-commits all-commits at lists.llvm.org
Tue Jun 16 11:51:52 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3adced3494d07ac6072a9336cb8ae3802f660c7a
      https://github.com/llvm/llvm-project/commit/3adced3494d07ac6072a9336cb8ae3802f660c7a
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2020-06-16 (Tue, 16 Jun 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/SCF/SCFOps.td
    M mlir/lib/Dialect/SCF/SCF.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp

  Log Message:
  -----------
  [mlir] Introduce callback-based builders to SCF Parallel and Reduce ops

Similarly to `scf::ForOp`, introduce additional `function_ref` arguments to
`::build` functions of SCF `ParallelOp` and `ReduceOp`. The provided functions
will be called to construct the body of the respective operations while
constructing the operation itself. Exercise them in LoopUtils.

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


  Commit: b4bc72afb78477dca7ba06b98b1b0002716297b7
      https://github.com/llvm/llvm-project/commit/b4bc72afb78477dca7ba06b98b1b0002716297b7
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2020-06-16 (Tue, 16 Jun 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Dialect/Linalg/Utils/Utils.cpp

  Log Message:
  -----------
  [mlir] refactor Linalg LoopNestBuilder to use common infra

Recent work has introduced support for constructing loops via `::build` with
callbacks that construct loop bodies using only the core OpBuilder. This is now
supported on all loop types that Linalg lowers to. Refactor LoopNestBuilder in
Linalg to rely on this functionality instead of using a custom EDSC-based
approach to creating loop nests.

The specialization targeting parallel loops is also simplified by factoring out
the recursive call into a separate static function and considering only two
alternatives: top-level loop is parallel or sequential.

This removes the last remaining in-tree use of edsc::LoopBuilder, which is now
deprecated and will be removed soon.

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


Compare: https://github.com/llvm/llvm-project/compare/8a3340d25d19...b4bc72afb784


More information about the All-commits mailing list