[all-commits] [llvm/llvm-project] af5e83: [MLIR] Introduce utility to hoist affine if/else c...

Uday Bondhugula via All-commits all-commits at lists.llvm.org
Wed Apr 15 12:03:12 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: af5e83f569819bab68a070ca59128651feefb7ef
      https://github.com/llvm/llvm-project/commit/af5e83f569819bab68a070ca59128651feefb7ef
  Author: Uday Bondhugula <uday at polymagelabs.com>
  Date:   2020-04-16 (Thu, 16 Apr 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
    A mlir/include/mlir/Dialect/Affine/Utils.h
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/include/mlir/IR/Operation.h
    M mlir/lib/Dialect/Affine/CMakeLists.txt
    A mlir/lib/Dialect/Affine/Utils/CMakeLists.txt
    A mlir/lib/Dialect/Affine/Utils/Utils.cpp
    A mlir/test/Dialect/Affine/loop-unswitch.mlir
    M mlir/test/lib/Dialect/Affine/CMakeLists.txt
    A mlir/test/lib/Dialect/Affine/TestAffineLoopUnswitching.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp

  Log Message:
  -----------
  [MLIR] Introduce utility to hoist affine if/else conditions

This revision introduces a utility to unswitch affine.for/parallel loops
by hoisting affine.if operations past surrounding affine.for/parallel.
The hoisting works for both perfect/imperfect nests and in the presence
of else blocks. The hoisting is currently to as outermost a level as
possible.  Uses a test pass to test the utility.
Add convenience method Operation::getParentWithTrait<Trait>.

Depends on D77487.

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




More information about the All-commits mailing list