[PATCH] D77418: [mlir] LoopToStandard conversion: support "if/else" with results

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 3 11:20:23 PDT 2020


ftynse created this revision.
ftynse added a reviewer: nicolasvasilache.
Herald added subscribers: llvm-commits, grosul1, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, burmako, jpienaar, rriddle, mehdi_amini.
Herald added a project: LLVM.
ftynse added a reviewer: gysit.

A recent extension allowed the `loop.if` operation to return results yielded by
its regions. However, such operations could not be lowered to a CFG of standard
operations because it would have required to modify the argument list of a
block, which is not allowed in a conversion pattern. Now that the conversion
infrastructure supports block creation, use it to create a block with an
argument list that dominates the operations following the `loop.if` and forward
the results as arguments of this block.

Depends On D77416 <https://reviews.llvm.org/D77416>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77418

Files:
  mlir/lib/Conversion/LoopToStandard/LoopToStandard.cpp
  mlir/test/Conversion/convert-to-cfg.mlir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77418.254858.patch
Type: text/x-patch
Size: 8933 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200403/5f622c76/attachment-0001.bin>


More information about the llvm-commits mailing list