[mlir][IR] Move match
and rewrite
functions into separate class
#145003
Loading
match
and rewrite
functions into separate class
#145003