[mlir] Add lowering to CFG for WhileOp
authorAlex Zinenko <zinenko@google.com>
Wed, 4 Nov 2020 08:42:04 +0000 (09:42 +0100)
committerAlex Zinenko <zinenko@google.com>
Wed, 4 Nov 2020 08:43:13 +0000 (09:43 +0100)
commit4c0e255c98cc0e7769be9c9b2700d96e76aec99f
tree485fb2d91a5be5921e64a550681292602837c0c4
parent79716559b5acee891d5664315d7862c5b5c1d34f
[mlir] Add lowering to CFG for WhileOp

The lowering is a straightforward inlining of the "before" and "after" regions
connected by (conditional) branches. This plugs the WhileOp into the
progressive lowering scheme. Future commits may choose to target WhileOp
instead of CFG when lowering ForOp.

Differential Revision: https://reviews.llvm.org/D90603
mlir/lib/Conversion/SCFToStandard/SCFToStandard.cpp
mlir/test/Conversion/SCFToStandard/convert-to-cfg.mlir