diff --git a/mlir/docs/Tutorials/Toy/Ch-5.md b/mlir/docs/Tutorials/Toy/Ch-5.md index 9cd1533d184d..ef95fa4bb4e5 100644 --- a/mlir/docs/Tutorials/Toy/Ch-5.md +++ b/mlir/docs/Tutorials/Toy/Ch-5.md @@ -147,7 +147,7 @@ void ToyToAffineLoweringPass::runOnFunction() { // Now that the conversion target has been defined, we just need to provide // the set of patterns that will lower the Toy operations. - mlir::RewritePatternSet patterns; + mlir::RewritePatternSet patterns(&getContext()); patterns.add<..., TransposeOpLowering>(&getContext()); ... diff --git a/mlir/docs/Tutorials/Toy/Ch-6.md b/mlir/docs/Tutorials/Toy/Ch-6.md index b490421fab4a..c54c8d36a2c9 100644 --- a/mlir/docs/Tutorials/Toy/Ch-6.md +++ b/mlir/docs/Tutorials/Toy/Ch-6.md @@ -90,7 +90,7 @@ into LLVM dialect. These patterns allow for lowering the IR in multiple stages by relying on [transitive lowering](../../../getting_started/Glossary.md#transitive-lowering). ```c++ - mlir::RewritePatternSet patterns; + mlir::RewritePatternSet patterns(&getContext()); mlir::populateAffineToStdConversionPatterns(patterns, &getContext()); mlir::populateLoopToStdConversionPatterns(patterns, &getContext()); mlir::populateStdToLLVMConversionPatterns(typeConverter, patterns);