[PATCH] D77083: [MLIR] Add pattern rewriter util to erase block; add affine.if pattern to remove dead else blocks
Uday Bondhugula via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 30 14:11:37 PDT 2020
bondhugula marked an inline comment as done.
bondhugula added inline comments.
================
Comment at: mlir/include/mlir/IR/PatternMatch.h:285
+ /// known to have no uses.
+ virtual void eraseBlock(Block *block);
+
----------------
rriddle wrote:
> bondhugula wrote:
> > rriddle wrote:
> > > Can you add proper handling for DialectConversion?
> > Sorry, I didn't understand. What does dialect conversion need from eraseBlock? and which it doesn't from eraseOp?
> DialectConversion doesn't allow performing the IR mutation until after the conversion is successful. In this case, you can't erase the block directly because this action may need to be undone later.
Sure - but could you provide a pointer on what handling you need here? Is it trivial? It looks like one shouldn't use eraseBlock in such cases, but rely on a lower level approach?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77083/new/
https://reviews.llvm.org/D77083
More information about the llvm-commits
mailing list