[mlir] Introduce callback-based builders to SCF Parallel and Reduce ops
authorAlex Zinenko <zinenko@google.com>
Tue, 16 Jun 2020 12:22:49 +0000 (14:22 +0200)
committerAlex Zinenko <zinenko@google.com>
Tue, 16 Jun 2020 18:51:32 +0000 (20:51 +0200)
commit3adced3494d07ac6072a9336cb8ae3802f660c7a
treec23d3ba2b79cedb3b2518e07b5c6efcaad0db709
parent8a3340d25d19928086b9c0a537c724998d75e941
[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
mlir/include/mlir/Dialect/SCF/SCFOps.td
mlir/lib/Dialect/SCF/SCF.cpp
mlir/lib/Transforms/Utils/LoopUtils.cpp