This revision introduces a helper function to allow applying rewrite patterns, interleaved with more global transformations, in a staged fashion:
- the first stage consists of an OwningRewritePatternList. The RewritePattern in this list are applied once and in order.
- the second stage consists of a single OwningRewritePattern that is applied greedily until convergence.
- 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.
it's a list of OwningRewritePatternLists