[all-commits] [llvm/llvm-project] 8647a9: [mlir] Refactor affine loop nest builders

ftynse via All-commits all-commits at lists.llvm.org
Thu Jun 18 14:03:41 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8647a9bc511bd47ca80ae48761662436066a09bb
      https://github.com/llvm/llvm-project/commit/8647a9bc511bd47ca80ae48761662436066a09bb
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/Affine/IR/AffineOps.h
    M mlir/lib/Dialect/Affine/EDSC/Builders.cpp
    M mlir/lib/Dialect/Affine/IR/AffineOps.cpp

  Log Message:
  -----------
  [mlir] Refactor affine loop nest builders

Existing implementation of affine loop nest builders relies on EDSC
ScopedContext, which is not used pervasively. Provide a common OpBuilder-based
helper function to construct a perfect nest of affine loops with the body of
the innermost loop populated by a callback. Use this function to implement the
EDSC version.

Affine "for" loops differ from SCF "for" loops by (1) not allowing to yield
values and (2) supporting short-hand form for constant bounds, which justifies
a separate implementation of the loop nest builder for the same of simplicity.

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


  Commit: 68628c94cdf7d11014cafc84cbb59f5bc79756f2
      https://github.com/llvm/llvm-project/commit/68628c94cdf7d11014cafc84cbb59f5bc79756f2
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
    M mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
    M mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp

  Log Message:
  -----------
  [mlir] Update Toy tutorial to use callback-based loop constructors

We recently introduced support for building loops or loop nests using callbacks
that populate the body. Use these in the tutorial instead of setInsertionPoint
manipulations.

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


Compare: https://github.com/llvm/llvm-project/compare/80d7ac3bc7c0...68628c94cdf7


More information about the All-commits mailing list