This is an archive of the discontinued LLVM Phabricator instance.

[mlir][PatternRewriter] Add a new hook to selectively replace uses of an operation
ClosedPublic

Authored by rriddle on Jan 13 2021, 1:30 PM.

Details

Summary

This revision adds a new replaceOpWithIf hook that replaces uses of an operation that satisfy a given functor. If all uses are replaced, the operation gets erased in a similar manner to replaceOp. DialectConversion support will be added in a followup as this requires adjusting how replacements are tracked there.

Diff Detail