[mlir][GreedyPatternRewriter] Add out param to detect changes in IR in `applyPatterns...
authorJoel Wee <joelwee@google.com>
Thu, 29 Jun 2023 10:46:54 +0000 (12:46 +0200)
committerMatthias Springer <me@m-sp.org>
Thu, 29 Jun 2023 10:48:00 +0000 (12:48 +0200)
commit8498c9e9489f57c6eb59b464d2409b4974a22a02
tree534ea949658a54de14d9b5e8b9372f37a6ed5dbb
parentd34bc66ef9bd2ec815c7e71ad43c412c88884411
[mlir][GreedyPatternRewriter] Add out param to detect changes in IR in `applyPatternsAndFoldGreedily`

This allows users of `applyPatternsAndFoldGreedily` to detect if any MLIR changes have occurred. An example use-case is where we expect the `applyPatternsAndFoldGreedily` to change the IR and want to validate that it indeed does change it.

Differential Revision: https://reviews.llvm.org/D153986
mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp