[mlir] Canonicalize IfOp with trivial `then` and `else` bodies to list of SelectOp's
authorButygin <ivan.butygin@intel.com>
Fri, 12 Mar 2021 14:39:43 +0000 (17:39 +0300)
committerButygin <ivan.butygin@intel.com>
Sat, 20 Mar 2021 09:18:49 +0000 (12:18 +0300)
commit5657f93e788f093c70fb448dd6f9398b149df278
tree98d59818fc72cd042fdc817125cb570a919984cf
parent319d093b87a89712573d159da019ce363ae51430
[mlir] Canonicalize IfOp with trivial `then` and `else` bodies to list of SelectOp's

* Do we need a threshold on maximum number of Yeild arguments processed (maximum number of SelectOp's to be generated)?
* Had to modify some old IfOp tests to not get optimized by this pattern

Differential Revision: https://reviews.llvm.org/D98592
mlir/lib/Dialect/SCF/SCF.cpp
mlir/test/Dialect/SCF/canonicalize.mlir