[all-commits] [llvm/llvm-project] 104fad: [MLIR] Add folder for zero trip count affine.for

Uday Bondhugula via All-commits all-commits at lists.llvm.org
Wed Jul 21 07:59:40 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 104fad99c9e378c09061f2d4c05e9a506b4ad58b
      https://github.com/llvm/llvm-project/commit/104fad99c9e378c09061f2d4c05e9a506b4ad58b
  Author: Uday Bondhugula <uday at polymagelabs.com>
  Date:   2021-07-21 (Wed, 21 Jul 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
    M mlir/lib/Dialect/Affine/IR/AffineOps.cpp
    M mlir/test/Dialect/Affine/canonicalize.mlir

  Log Message:
  -----------
  [MLIR] Add folder for zero trip count affine.for

AffineForOp's folding hook is expected to fold away trivially empty
affine.for.  This allows simplification to happen as part of the
canonicalizer and from wherever the folding hook is used. While more
complex analysis based zero trip count detection is available from other
passes in analysis and transforms, simple and inexpensive folding had
been missing.

Also, update/improve affine.for op documentation clarifying semantics of
the result values for zero trip count loops.

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




More information about the All-commits mailing list