[mlir][doc] Fix usage of PatternApplicator.

The constructor of PatternApplicator doesn't have a constructor that
accepts only a `RewritePatternSet` as currently used in the example
code in PatternRewriter.md. Instead, one has to turn it into a
`FrozenRewritePatternSet`.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D125236
This commit is contained in:
Ingo Müller 2022-05-09 15:05:47 +00:00
parent 46b1a7c5f9
commit d4a7ca81fe
1 changed files with 1 additions and 1 deletions

View File

@ -283,7 +283,7 @@ public:
/// Apply the custom driver to `op`.
void applyMyPatternDriver(Operation *op,
const RewritePatternSet &patterns) {
const FrozenRewritePatternSet &patterns) {
// Initialize the custom PatternRewriter.
MyPatternRewriter rewriter(op->getContext());