[Mlir-commits] [mlir] d4a7ca8 - [mlir][doc] Fix usage of PatternApplicator.

Ingo Müller llvmlistbot at llvm.org
Thu Jul 14 02:08:31 PDT 2022


Author: Ingo Müller
Date: 2022-07-14T09:08:26Z
New Revision: d4a7ca81feb42f3baa23506587abe3892f603c7a

URL: https://github.com/llvm/llvm-project/commit/d4a7ca81feb42f3baa23506587abe3892f603c7a
DIFF: https://github.com/llvm/llvm-project/commit/d4a7ca81feb42f3baa23506587abe3892f603c7a.diff

LOG: [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

Added: 
    

Modified: 
    mlir/docs/PatternRewriter.md

Removed: 
    


################################################################################
diff  --git a/mlir/docs/PatternRewriter.md b/mlir/docs/PatternRewriter.md
index f03a220c41684..d221ce96eab96 100644
--- a/mlir/docs/PatternRewriter.md
+++ b/mlir/docs/PatternRewriter.md
@@ -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());
 


        


More information about the Mlir-commits mailing list