[mlir][Linalg] Introduce a helper function for staged pattern application
Summary: This revision introduces a helper function to allow applying rewrite patterns, interleaved with more global transformations, in a staged fashion: 1. the first stage consists of an OwningRewritePatternList. The RewritePattern in this list are applied once and in order. 2. the second stage consists of a single OwningRewritePattern that is applied greedily until convergence. 3. the third stage consists of applying a lambda, generally used for non-local transformation effects. This allows creating custom fused transformations where patterns can be ordered and applied at a finer granularity than a sequence of traditional compiler passes. A test that exercises these behaviors is added. Differential Revision: https://reviews.llvm.org/D79518
Loading
Please sign in to comment