Page MenuHomePhabricator

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

Authored by rriddle on Wed, Jan 13, 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