This is an archive of the discontinued LLVM Phabricator instance.

[PDLL] Add a `replace` rewrite statement for replacing operations
ClosedPublic

Authored by rriddle on Dec 7 2021, 3:22 PM.

Details

Summary

This statement acts as a companion to the existing erase
statement, and is the corresponding PDLL construct for the
PatternRewriter::replaceOp C++ API. This statement replaces a
given operation with a set of values.

Depends On D115297

Diff Detail

Event Timeline

rriddle created this revision.Dec 7 2021, 3:22 PM
rriddle requested review of this revision.Dec 7 2021, 3:22 PM
nicolasvasilache accepted this revision.Dec 8 2021, 4:42 AM
nicolasvasilache added inline comments.
mlir/include/mlir/Tools/PDLL/AST/Nodes.h
924

nl

This revision is now accepted and ready to land.Dec 8 2021, 4:42 AM
jpienaar accepted this revision.Dec 12 2021, 6:27 PM

It would be good to add a multi-op replacement example utilizing single op replacement too

Mogball accepted this revision.Dec 15 2021, 12:19 PM
This revision was landed with ongoing or failed builds.Dec 15 2021, 6:17 PM
This revision was automatically updated to reflect the committed changes.