[mlir] support conversion of parallel reduction loops to std
authorAlex Zinenko <zinenko@google.com>
Wed, 4 Mar 2020 10:44:22 +0000 (11:44 +0100)
committerAlex Zinenko <zinenko@google.com>
Wed, 4 Mar 2020 15:37:17 +0000 (16:37 +0100)
commitaff6bf4ff81a35a85034b478cccc7015499ce427
tree653ddb95f2de0d3e7bfcfc944b9243813c472ec1
parent16c6e0f387e957d21ab90c8694c11cd269ec7719
[mlir] support conversion of parallel reduction loops to std

Recently introduced support for converting sequential reduction loops to
CFG of basic blocks in the Standard dialect makes it possible to perform
a staged conversion of parallel reduction loops into a similar CFG by
using sequential loops as an intermediate step. This is already the case
for parallel loops without reduction, so extend the pattern to support
an additional use case.

Differential Revision: https://reviews.llvm.org/D75599
mlir/include/mlir/Dialect/LoopOps/LoopOps.td
mlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp
mlir/lib/Dialect/LoopOps/LoopOps.cpp
mlir/test/Conversion/convert-to-cfg.mlir