[PSA] Deprecating `match` and `rewrite`

For historic reasons, RewritePattern and ConversionPattern have match and rewrite functions. With [mlir][IR] Deprecate `match` and `rewrite` functions by matthias-springer · Pull Request #130031 · llvm/llvm-project · GitHub, these functions were deprecated in favor of matchAndRewrite. They will be removed soon.

Please update your code base to use matchAndRewrite (e.g., by overriding matchAndRewrite with an implementation that simply calls match and rewrite).

4 Likes

Should we also add it to: Deprecations & Current Refactoring - MLIR ?

I uploaded a PR: Add deprecation notice for `match` and `rewrite` by matthias-springer · Pull Request #217 · llvm/mlir-www · GitHub

I cannot add any reviewers though.

Submitted. Thanks for the headsup.

The end of an era :slight_smile:

Thanks @matthias-springer , fantastic community work, much appreciated!

-Andrzej

Hello, I have a question regarding this deprecation.
Will functions such as matchPattern or Pattern::match() be deprecated as well?

No, IR matchers (API in mlir/IR/Matchers.h) will stay as is.

1 Like

Thank you for the reply :slight_smile: