[Mlir-commits] [mlir] 289eccc - Tidy up some docs.

Chris Lattner llvmlistbot at llvm.org
Mon Mar 22 17:21:06 PDT 2021


Author: Chris Lattner
Date: 2021-03-22T17:20:50-07:00
New Revision: 289ecccaddeea5a6c5840f3e081b04022ba04c26

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

LOG: Tidy up some docs.

Depends on D99127.

Differential Revision: https://reviews.llvm.org/D99130

Added: 
    

Modified: 
    mlir/docs/Tutorials/Toy/Ch-5.md
    mlir/docs/Tutorials/Toy/Ch-6.md

Removed: 
    


################################################################################
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);


        


More information about the Mlir-commits mailing list