HomePhabricator

[mlir] Refactor RewritePatternMatcher into a new PatternApplicator class.

Authored by rriddle on Thu, Jun 18, 1:58 PM.

Description

[mlir] Refactor RewritePatternMatcher into a new PatternApplicator class.

This class enables for abstracting more of the details for the rewrite process, and will allow for clients to apply specific cost models to the pattern list. This allows for DialectConversion and the GreedyPatternRewriter to share the same underlying matcher implementation. This also simplifies the plumbing necessary to support dynamic patterns.

Differential Revision: https://reviews.llvm.org/D81985