[PATCH] D80135: [mlir] DialectConversion: support erasing blocks

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 18 09:08:42 PDT 2020


ftynse created this revision.
ftynse added reviewers: nicolasvasilache, rriddle, mehdi_amini.
Herald added subscribers: llvm-commits, jurahul, Kayjukh, frgossen, grosul1, Joonsoo, stephenneuendorffer, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, jpienaar.
Herald added a project: LLVM.

PatternRewriter has support for erasing a Block from its parent region, but
this feature has not been implemented for ConversionPatternRewriter that needs
to keep track of and be able to undo block actions. Introduce support for
undoing block erasure in the ConversionPatternRewriter by marking all the ops
it contains for erasure and by detaching the block from its parent region. The
detached block is stored in the action description and is not actually deleted
until the rewrites are applied.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80135

Files:
  mlir/lib/Transforms/DialectConversion.cpp
  mlir/test/Transforms/test-legalizer.mlir
  mlir/test/lib/Dialect/Test/TestPatterns.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80135.264650.patch
Type: text/x-patch
Size: 8874 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200518/7aec044c/attachment.bin>


More information about the llvm-commits mailing list