[Mlir-commits] [mlir] 5633813 - [MLIR] Fix several misc issues in in Toy tutorial

Jacques Pienaar llvmlistbot at llvm.org
Mon May 11 16:57:07 PDT 2020


Author: Rahul Joshi
Date: 2020-05-11T16:56:47-07:00
New Revision: 5633813bf376ef12056cc8ce34c03c445d0dbce5

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

LOG: [MLIR] Fix several misc issues in in Toy tutorial

Summary:
- Fix comments in several places
- Eliminate extra ' in AST dump and adjust tests accordingly

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

Added: 
    

Modified: 
    mlir/docs/Tutorials/Toy/Ch-1.md
    mlir/docs/Tutorials/Toy/Ch-2.md
    mlir/docs/Tutorials/Toy/Ch-3.md
    mlir/docs/Tutorials/Toy/Ch-5.md
    mlir/examples/toy/Ch1/parser/AST.cpp
    mlir/examples/toy/Ch2/include/toy/Ops.td
    mlir/examples/toy/Ch2/mlir/Dialect.cpp
    mlir/examples/toy/Ch2/parser/AST.cpp
    mlir/examples/toy/Ch3/include/toy/Ops.td
    mlir/examples/toy/Ch3/mlir/Dialect.cpp
    mlir/examples/toy/Ch3/parser/AST.cpp
    mlir/examples/toy/Ch4/include/toy/Ops.td
    mlir/examples/toy/Ch4/mlir/Dialect.cpp
    mlir/examples/toy/Ch4/parser/AST.cpp
    mlir/examples/toy/Ch5/include/toy/Ops.td
    mlir/examples/toy/Ch5/mlir/Dialect.cpp
    mlir/examples/toy/Ch5/parser/AST.cpp
    mlir/examples/toy/Ch6/include/toy/Ops.td
    mlir/examples/toy/Ch6/mlir/Dialect.cpp
    mlir/examples/toy/Ch6/parser/AST.cpp
    mlir/examples/toy/Ch7/include/toy/Ops.td
    mlir/examples/toy/Ch7/mlir/Dialect.cpp
    mlir/examples/toy/Ch7/parser/AST.cpp
    mlir/include/mlir/ExecutionEngine/OptUtils.h
    mlir/test/Examples/Toy/Ch1/ast.toy
    mlir/test/Examples/Toy/Ch2/ast.toy
    mlir/test/Examples/Toy/Ch3/ast.toy
    mlir/test/Examples/Toy/Ch4/ast.toy
    mlir/test/Examples/Toy/Ch5/ast.toy
    mlir/test/Examples/Toy/Ch6/ast.toy
    mlir/test/Examples/Toy/Ch7/ast.toy
    mlir/test/Examples/Toy/Ch7/struct-ast.toy

Removed: 
    


################################################################################
diff  --git a/mlir/docs/Tutorials/Toy/Ch-1.md b/mlir/docs/Tutorials/Toy/Ch-1.md
index 7c2f49918049..eebbb78e5a16 100644
--- a/mlir/docs/Tutorials/Toy/Ch-1.md
+++ b/mlir/docs/Tutorials/Toy/Ch-1.md
@@ -29,7 +29,7 @@ This tutorial is divided in the following chapters:
     with Interfaces. Here we will show how to plug dialect specific information
     into generic transformations like shape inference and inlining.
 -   [Chapter #5](Ch-5.md): Partially lowering to lower-level dialects. We'll
-    convert some our high level language specific semantics towards a generic
+    convert some of our high level language specific semantics towards a generic
     affine oriented dialect for optimization.
 -   [Chapter #6](Ch-6.md): Lowering to LLVM and code generation. Here we'll
     target LLVM IR for code generation, and detail more of the lowering

diff  --git a/mlir/docs/Tutorials/Toy/Ch-2.md b/mlir/docs/Tutorials/Toy/Ch-2.md
index 4265b06c4e8b..1180a9f41bcc 100755
--- a/mlir/docs/Tutorials/Toy/Ch-2.md
+++ b/mlir/docs/Tutorials/Toy/Ch-2.md
@@ -146,8 +146,6 @@ This handling can be observed by crafting what should be an invalid IR for Toy
 and seeing it round-trip without tripping the verifier:
 
 ```mlir
-// RUN: toyc %s -emit=mlir
-
 func @main() {
   %0 = "toy.print"() : () -> tensor<2x3xf64>
 }

diff  --git a/mlir/docs/Tutorials/Toy/Ch-3.md b/mlir/docs/Tutorials/Toy/Ch-3.md
index d6a72b071647..5353b58acddf 100644
--- a/mlir/docs/Tutorials/Toy/Ch-3.md
+++ b/mlir/docs/Tutorials/Toy/Ch-3.md
@@ -98,7 +98,7 @@ struct SimplifyRedundantTranspose : public mlir::OpRewritePattern<TransposeOp> {
       return failure();
 
     // Otherwise, we have a redundant transpose. Use the rewriter.
-    rewriter.replaceOp(op, {transposeInputOp.getOperand()}, {transposeInputOp});
+    rewriter.replaceOp(op, {transposeInputOp.getOperand()});
     return success();
   }
 };

diff  --git a/mlir/docs/Tutorials/Toy/Ch-5.md b/mlir/docs/Tutorials/Toy/Ch-5.md
index 67fc0f602e9f..ca59da20d127 100644
--- a/mlir/docs/Tutorials/Toy/Ch-5.md
+++ b/mlir/docs/Tutorials/Toy/Ch-5.md
@@ -268,8 +268,8 @@ func @main() {
   }
 
   // Multiply and store into the output buffer.
-  affine.for %arg0 = 0 to 2 {
-    affine.for %arg1 = 0 to 3 {
+  affine.for %arg0 = 0 to 3 {
+    affine.for %arg1 = 0 to 2 {
       %3 = affine.load %1[%arg0, %arg1] : memref<3x2xf64>
       %4 = affine.load %1[%arg0, %arg1] : memref<3x2xf64>
       %5 = mulf %3, %4 : f64

diff  --git a/mlir/examples/toy/Ch1/parser/AST.cpp b/mlir/examples/toy/Ch1/parser/AST.cpp
index 9bd78764c677..9315bb1d2ada 100644
--- a/mlir/examples/toy/Ch1/parser/AST.cpp
+++ b/mlir/examples/toy/Ch1/parser/AST.cpp
@@ -201,7 +201,7 @@ void ASTDumper::dump(const VarType &type) {
 /// parameters names.
 void ASTDumper::dump(PrototypeAST *node) {
   INDENT();
-  llvm::errs() << "Proto '" << node->getName() << "' " << loc(node) << "'\n";
+  llvm::errs() << "Proto '" << node->getName() << "' " << loc(node) << "\n";
   indent();
   llvm::errs() << "Params: [";
   llvm::interleaveComma(node->getArgs(), llvm::errs(),

diff  --git a/mlir/examples/toy/Ch2/include/toy/Ops.td b/mlir/examples/toy/Ch2/include/toy/Ops.td
index 4e06634c6d4e..14a20a24005b 100644
--- a/mlir/examples/toy/Ch2/include/toy/Ops.td
+++ b/mlir/examples/toy/Ch2/include/toy/Ops.td
@@ -125,7 +125,7 @@ def GenericCallOp : Toy_Op<"generic_call"> {
   // The generic call operation returns a single value of TensorType.
   let results = (outs F64Tensor);
 
-  // The return operation only emits the input in the format if it is present.
+  // Specialize assembly printing and parsing using a declarative format.
   let assemblyFormat = [{
     $callee `(` $inputs `)` attr-dict `:` functional-type($inputs, results)
   }];

diff  --git a/mlir/examples/toy/Ch2/mlir/Dialect.cpp b/mlir/examples/toy/Ch2/mlir/Dialect.cpp
index b60d792e2e01..91723c30c989 100644
--- a/mlir/examples/toy/Ch2/mlir/Dialect.cpp
+++ b/mlir/examples/toy/Ch2/mlir/Dialect.cpp
@@ -216,10 +216,9 @@ static mlir::LogicalResult verify(ReturnOp op) {
       resultType.isa<mlir::UnrankedTensorType>())
     return mlir::success();
 
-  return op.emitError() << "type of return operand ("
-                        << *op.operand_type_begin()
+  return op.emitError() << "type of return operand (" << inputType
                         << ") doesn't match function result type ("
-                        << results.front() << ")";
+                        << resultType << ")";
 }
 
 //===----------------------------------------------------------------------===//

diff  --git a/mlir/examples/toy/Ch2/parser/AST.cpp b/mlir/examples/toy/Ch2/parser/AST.cpp
index 9bd78764c677..9315bb1d2ada 100644
--- a/mlir/examples/toy/Ch2/parser/AST.cpp
+++ b/mlir/examples/toy/Ch2/parser/AST.cpp
@@ -201,7 +201,7 @@ void ASTDumper::dump(const VarType &type) {
 /// parameters names.
 void ASTDumper::dump(PrototypeAST *node) {
   INDENT();
-  llvm::errs() << "Proto '" << node->getName() << "' " << loc(node) << "'\n";
+  llvm::errs() << "Proto '" << node->getName() << "' " << loc(node) << "\n";
   indent();
   llvm::errs() << "Params: [";
   llvm::interleaveComma(node->getArgs(), llvm::errs(),

diff  --git a/mlir/examples/toy/Ch3/include/toy/Ops.td b/mlir/examples/toy/Ch3/include/toy/Ops.td
index 5a407603164a..9bf9f8d364b0 100644
--- a/mlir/examples/toy/Ch3/include/toy/Ops.td
+++ b/mlir/examples/toy/Ch3/include/toy/Ops.td
@@ -124,7 +124,7 @@ def GenericCallOp : Toy_Op<"generic_call"> {
   // The generic call operation returns a single value of TensorType.
   let results = (outs F64Tensor);
 
-  // The return operation only emits the input in the format if it is present.
+  // Specialize assembly printing and parsing using a declarative format.
   let assemblyFormat = [{
     $callee `(` $inputs `)` attr-dict `:` functional-type($inputs, results)
   }];

diff  --git a/mlir/examples/toy/Ch3/mlir/Dialect.cpp b/mlir/examples/toy/Ch3/mlir/Dialect.cpp
index b60d792e2e01..91723c30c989 100644
--- a/mlir/examples/toy/Ch3/mlir/Dialect.cpp
+++ b/mlir/examples/toy/Ch3/mlir/Dialect.cpp
@@ -216,10 +216,9 @@ static mlir::LogicalResult verify(ReturnOp op) {
       resultType.isa<mlir::UnrankedTensorType>())
     return mlir::success();
 
-  return op.emitError() << "type of return operand ("
-                        << *op.operand_type_begin()
+  return op.emitError() << "type of return operand (" << inputType
                         << ") doesn't match function result type ("
-                        << results.front() << ")";
+                        << resultType << ")";
 }
 
 //===----------------------------------------------------------------------===//

diff  --git a/mlir/examples/toy/Ch3/parser/AST.cpp b/mlir/examples/toy/Ch3/parser/AST.cpp
index 9bd78764c677..9315bb1d2ada 100644
--- a/mlir/examples/toy/Ch3/parser/AST.cpp
+++ b/mlir/examples/toy/Ch3/parser/AST.cpp
@@ -201,7 +201,7 @@ void ASTDumper::dump(const VarType &type) {
 /// parameters names.
 void ASTDumper::dump(PrototypeAST *node) {
   INDENT();
-  llvm::errs() << "Proto '" << node->getName() << "' " << loc(node) << "'\n";
+  llvm::errs() << "Proto '" << node->getName() << "' " << loc(node) << "\n";
   indent();
   llvm::errs() << "Params: [";
   llvm::interleaveComma(node->getArgs(), llvm::errs(),

diff  --git a/mlir/examples/toy/Ch4/include/toy/Ops.td b/mlir/examples/toy/Ch4/include/toy/Ops.td
index 1cd20802a0ca..13970e595831 100644
--- a/mlir/examples/toy/Ch4/include/toy/Ops.td
+++ b/mlir/examples/toy/Ch4/include/toy/Ops.td
@@ -149,7 +149,7 @@ def GenericCallOp : Toy_Op<"generic_call",
   // The generic call operation returns a single value of TensorType.
   let results = (outs F64Tensor);
 
-  // The return operation only emits the input in the format if it is present.
+  // Specialize assembly printing and parsing using a declarative format.
   let assemblyFormat = [{
     $callee `(` $inputs `)` attr-dict `:` functional-type($inputs, results)
   }];

diff  --git a/mlir/examples/toy/Ch4/mlir/Dialect.cpp b/mlir/examples/toy/Ch4/mlir/Dialect.cpp
index 02a70218af6d..5a64f0fd7ae7 100644
--- a/mlir/examples/toy/Ch4/mlir/Dialect.cpp
+++ b/mlir/examples/toy/Ch4/mlir/Dialect.cpp
@@ -291,10 +291,9 @@ static mlir::LogicalResult verify(ReturnOp op) {
       resultType.isa<mlir::UnrankedTensorType>())
     return mlir::success();
 
-  return op.emitError() << "type of return operand ("
-                        << *op.operand_type_begin()
+  return op.emitError() << "type of return operand (" << inputType
                         << ") doesn't match function result type ("
-                        << results.front() << ")";
+                        << resultType << ")";
 }
 
 //===----------------------------------------------------------------------===//

diff  --git a/mlir/examples/toy/Ch4/parser/AST.cpp b/mlir/examples/toy/Ch4/parser/AST.cpp
index 9bd78764c677..9315bb1d2ada 100644
--- a/mlir/examples/toy/Ch4/parser/AST.cpp
+++ b/mlir/examples/toy/Ch4/parser/AST.cpp
@@ -201,7 +201,7 @@ void ASTDumper::dump(const VarType &type) {
 /// parameters names.
 void ASTDumper::dump(PrototypeAST *node) {
   INDENT();
-  llvm::errs() << "Proto '" << node->getName() << "' " << loc(node) << "'\n";
+  llvm::errs() << "Proto '" << node->getName() << "' " << loc(node) << "\n";
   indent();
   llvm::errs() << "Params: [";
   llvm::interleaveComma(node->getArgs(), llvm::errs(),

diff  --git a/mlir/examples/toy/Ch5/include/toy/Ops.td b/mlir/examples/toy/Ch5/include/toy/Ops.td
index 7e7d5d10638c..826e9804a28c 100644
--- a/mlir/examples/toy/Ch5/include/toy/Ops.td
+++ b/mlir/examples/toy/Ch5/include/toy/Ops.td
@@ -149,7 +149,7 @@ def GenericCallOp : Toy_Op<"generic_call",
   // The generic call operation returns a single value of TensorType.
   let results = (outs F64Tensor);
 
-  // The return operation only emits the input in the format if it is present.
+  // Specialize assembly printing and parsing using a declarative format.
   let assemblyFormat = [{
     $callee `(` $inputs `)` attr-dict `:` functional-type($inputs, results)
   }];

diff  --git a/mlir/examples/toy/Ch5/mlir/Dialect.cpp b/mlir/examples/toy/Ch5/mlir/Dialect.cpp
index 02a70218af6d..5a64f0fd7ae7 100644
--- a/mlir/examples/toy/Ch5/mlir/Dialect.cpp
+++ b/mlir/examples/toy/Ch5/mlir/Dialect.cpp
@@ -291,10 +291,9 @@ static mlir::LogicalResult verify(ReturnOp op) {
       resultType.isa<mlir::UnrankedTensorType>())
     return mlir::success();
 
-  return op.emitError() << "type of return operand ("
-                        << *op.operand_type_begin()
+  return op.emitError() << "type of return operand (" << inputType
                         << ") doesn't match function result type ("
-                        << results.front() << ")";
+                        << resultType << ")";
 }
 
 //===----------------------------------------------------------------------===//

diff  --git a/mlir/examples/toy/Ch5/parser/AST.cpp b/mlir/examples/toy/Ch5/parser/AST.cpp
index 9bd78764c677..9315bb1d2ada 100644
--- a/mlir/examples/toy/Ch5/parser/AST.cpp
+++ b/mlir/examples/toy/Ch5/parser/AST.cpp
@@ -201,7 +201,7 @@ void ASTDumper::dump(const VarType &type) {
 /// parameters names.
 void ASTDumper::dump(PrototypeAST *node) {
   INDENT();
-  llvm::errs() << "Proto '" << node->getName() << "' " << loc(node) << "'\n";
+  llvm::errs() << "Proto '" << node->getName() << "' " << loc(node) << "\n";
   indent();
   llvm::errs() << "Params: [";
   llvm::interleaveComma(node->getArgs(), llvm::errs(),

diff  --git a/mlir/examples/toy/Ch6/include/toy/Ops.td b/mlir/examples/toy/Ch6/include/toy/Ops.td
index dee06c1f3b3c..cebf464819ea 100644
--- a/mlir/examples/toy/Ch6/include/toy/Ops.td
+++ b/mlir/examples/toy/Ch6/include/toy/Ops.td
@@ -149,7 +149,7 @@ def GenericCallOp : Toy_Op<"generic_call",
   // The generic call operation returns a single value of TensorType.
   let results = (outs F64Tensor);
 
-  // The return operation only emits the input in the format if it is present.
+  // Specialize assembly printing and parsing using a declarative format.
   let assemblyFormat = [{
     $callee `(` $inputs `)` attr-dict `:` functional-type($inputs, results)
   }];

diff  --git a/mlir/examples/toy/Ch6/mlir/Dialect.cpp b/mlir/examples/toy/Ch6/mlir/Dialect.cpp
index 02a70218af6d..5a64f0fd7ae7 100644
--- a/mlir/examples/toy/Ch6/mlir/Dialect.cpp
+++ b/mlir/examples/toy/Ch6/mlir/Dialect.cpp
@@ -291,10 +291,9 @@ static mlir::LogicalResult verify(ReturnOp op) {
       resultType.isa<mlir::UnrankedTensorType>())
     return mlir::success();
 
-  return op.emitError() << "type of return operand ("
-                        << *op.operand_type_begin()
+  return op.emitError() << "type of return operand (" << inputType
                         << ") doesn't match function result type ("
-                        << results.front() << ")";
+                        << resultType << ")";
 }
 
 //===----------------------------------------------------------------------===//

diff  --git a/mlir/examples/toy/Ch6/parser/AST.cpp b/mlir/examples/toy/Ch6/parser/AST.cpp
index 9bd78764c677..9315bb1d2ada 100644
--- a/mlir/examples/toy/Ch6/parser/AST.cpp
+++ b/mlir/examples/toy/Ch6/parser/AST.cpp
@@ -201,7 +201,7 @@ void ASTDumper::dump(const VarType &type) {
 /// parameters names.
 void ASTDumper::dump(PrototypeAST *node) {
   INDENT();
-  llvm::errs() << "Proto '" << node->getName() << "' " << loc(node) << "'\n";
+  llvm::errs() << "Proto '" << node->getName() << "' " << loc(node) << "\n";
   indent();
   llvm::errs() << "Params: [";
   llvm::interleaveComma(node->getArgs(), llvm::errs(),

diff  --git a/mlir/examples/toy/Ch7/include/toy/Ops.td b/mlir/examples/toy/Ch7/include/toy/Ops.td
index b453f13871ef..211cb81163fe 100644
--- a/mlir/examples/toy/Ch7/include/toy/Ops.td
+++ b/mlir/examples/toy/Ch7/include/toy/Ops.td
@@ -163,7 +163,7 @@ def GenericCallOp : Toy_Op<"generic_call",
   // StructType.
   let results = (outs Toy_Type);
 
-  // The return operation only emits the input in the format if it is present.
+  // Specialize assembly printing and parsing using a declarative format.
   let assemblyFormat = [{
     $callee `(` $inputs `)` attr-dict `:` functional-type($inputs, results)
   }];

diff  --git a/mlir/examples/toy/Ch7/mlir/Dialect.cpp b/mlir/examples/toy/Ch7/mlir/Dialect.cpp
index d653edea6e67..e77a427b3386 100644
--- a/mlir/examples/toy/Ch7/mlir/Dialect.cpp
+++ b/mlir/examples/toy/Ch7/mlir/Dialect.cpp
@@ -343,10 +343,9 @@ static mlir::LogicalResult verify(ReturnOp op) {
       resultType.isa<mlir::UnrankedTensorType>())
     return mlir::success();
 
-  return op.emitError() << "type of return operand ("
-                        << *op.operand_type_begin()
+  return op.emitError() << "type of return operand (" << inputType
                         << ") doesn't match function result type ("
-                        << results.front() << ")";
+                        << resultType << ")";
 }
 
 //===----------------------------------------------------------------------===//

diff  --git a/mlir/examples/toy/Ch7/parser/AST.cpp b/mlir/examples/toy/Ch7/parser/AST.cpp
index 220637d11b91..901d2f21edcd 100644
--- a/mlir/examples/toy/Ch7/parser/AST.cpp
+++ b/mlir/examples/toy/Ch7/parser/AST.cpp
@@ -217,7 +217,7 @@ void ASTDumper::dump(const VarType &type) {
 /// parameters names.
 void ASTDumper::dump(PrototypeAST *node) {
   INDENT();
-  llvm::errs() << "Proto '" << node->getName() << "' " << loc(node) << "'\n";
+  llvm::errs() << "Proto '" << node->getName() << "' " << loc(node) << "\n";
   indent();
   llvm::errs() << "Params: [";
   llvm::interleaveComma(node->getArgs(), llvm::errs(),

diff  --git a/mlir/include/mlir/ExecutionEngine/OptUtils.h b/mlir/include/mlir/ExecutionEngine/OptUtils.h
index 53879202d3cf..b33959ef468a 100644
--- a/mlir/include/mlir/ExecutionEngine/OptUtils.h
+++ b/mlir/include/mlir/ExecutionEngine/OptUtils.h
@@ -27,7 +27,7 @@ class TargetMachine;
 
 namespace mlir {
 
-/// Initialize LLVM passes that can be when running MLIR code using
+/// Initialize LLVM passes that can be used when running MLIR code using
 /// ExecutionEngine.
 void initializeLLVMPasses();
 

diff  --git a/mlir/test/Examples/Toy/Ch1/ast.toy b/mlir/test/Examples/Toy/Ch1/ast.toy
index f13d690a7d01..19f525a48808 100644
--- a/mlir/test/Examples/Toy/Ch1/ast.toy
+++ b/mlir/test/Examples/Toy/Ch1/ast.toy
@@ -31,7 +31,7 @@ def main() {
 
 # CHECK: Module:
 # CHECK-NEXT:     Function
-# CHECK-NEXT:       Proto 'multiply_transpose' @{{.*}}ast.toy:4:1'
+# CHECK-NEXT:       Proto 'multiply_transpose' @{{.*}}ast.toy:4:1
 # CHECK-NEXT:       Params: [a, b]
 # CHECK-NEXT:       Block {
 # CHECK-NEXT:         Return
@@ -44,7 +44,7 @@ def main() {
 # CHECK-NEXT:             ]
 # CHECK-NEXT:       } // Block
 # CHECK-NEXT:     Function
-# CHECK-NEXT:       Proto 'main' @{{.*}}ast.toy:8:1'
+# CHECK-NEXT:       Proto 'main' @{{.*}}ast.toy:8:1
 # CHECK-NEXT:       Params: []
 # CHECK-NEXT:       Block {
 # CHECK-NEXT:         VarDecl a<> @{{.*}}ast.toy:11:3

diff  --git a/mlir/test/Examples/Toy/Ch2/ast.toy b/mlir/test/Examples/Toy/Ch2/ast.toy
index 5f399372f606..48bd4432bf72 100644
--- a/mlir/test/Examples/Toy/Ch2/ast.toy
+++ b/mlir/test/Examples/Toy/Ch2/ast.toy
@@ -31,7 +31,7 @@ def main() {
 
 # CHECK: Module:
 # CHECK-NEXT:     Function
-# CHECK-NEXT:       Proto 'multiply_transpose' @{{.*}}ast.toy:4:1'
+# CHECK-NEXT:       Proto 'multiply_transpose' @{{.*}}ast.toy:4:1
 # CHECK-NEXT:       Params: [a, b]
 # CHECK-NEXT:       Block {
 # CHECK-NEXT:         Return
@@ -44,7 +44,7 @@ def main() {
 # CHECK-NEXT:             ]
 # CHECK-NEXT:       } // Block
 # CHECK-NEXT:     Function
-# CHECK-NEXT:       Proto 'main' @{{.*}}ast.toy:8:1'
+# CHECK-NEXT:       Proto 'main' @{{.*}}ast.toy:8:1
 # CHECK-NEXT:       Params: []
 # CHECK-NEXT:       Block {
 # CHECK-NEXT:         VarDecl a<> @{{.*}}ast.toy:11:3

diff  --git a/mlir/test/Examples/Toy/Ch3/ast.toy b/mlir/test/Examples/Toy/Ch3/ast.toy
index b8e4eb0bcccd..15ac2425390c 100644
--- a/mlir/test/Examples/Toy/Ch3/ast.toy
+++ b/mlir/test/Examples/Toy/Ch3/ast.toy
@@ -31,7 +31,7 @@ def main() {
 
 # CHECK: Module:
 # CHECK-NEXT:     Function
-# CHECK-NEXT:       Proto 'multiply_transpose' @{{.*}}ast.toy:4:1'
+# CHECK-NEXT:       Proto 'multiply_transpose' @{{.*}}ast.toy:4:1
 # CHECK-NEXT:       Params: [a, b]
 # CHECK-NEXT:       Block {
 # CHECK-NEXT:         Return
@@ -44,7 +44,7 @@ def main() {
 # CHECK-NEXT:             ]
 # CHECK-NEXT:       } // Block
 # CHECK-NEXT:     Function
-# CHECK-NEXT:       Proto 'main' @{{.*}}ast.toy:8:1'
+# CHECK-NEXT:       Proto 'main' @{{.*}}ast.toy:8:1
 # CHECK-NEXT:       Params: []
 # CHECK-NEXT:       Block {
 # CHECK-NEXT:         VarDecl a<> @{{.*}}ast.toy:11:3

diff  --git a/mlir/test/Examples/Toy/Ch4/ast.toy b/mlir/test/Examples/Toy/Ch4/ast.toy
index c991cc130cd1..d665be5e85ab 100644
--- a/mlir/test/Examples/Toy/Ch4/ast.toy
+++ b/mlir/test/Examples/Toy/Ch4/ast.toy
@@ -31,7 +31,7 @@ def main() {
 
 # CHECK: Module:
 # CHECK-NEXT:     Function
-# CHECK-NEXT:       Proto 'multiply_transpose' @{{.*}}ast.toy:4:1'
+# CHECK-NEXT:       Proto 'multiply_transpose' @{{.*}}ast.toy:4:1
 # CHECK-NEXT:       Params: [a, b]
 # CHECK-NEXT:       Block {
 # CHECK-NEXT:         Return
@@ -44,7 +44,7 @@ def main() {
 # CHECK-NEXT:             ]
 # CHECK-NEXT:       } // Block
 # CHECK-NEXT:     Function
-# CHECK-NEXT:       Proto 'main' @{{.*}}ast.toy:8:1'
+# CHECK-NEXT:       Proto 'main' @{{.*}}ast.toy:8:1
 # CHECK-NEXT:       Params: []
 # CHECK-NEXT:       Block {
 # CHECK-NEXT:         VarDecl a<> @{{.*}}ast.toy:11:3

diff  --git a/mlir/test/Examples/Toy/Ch5/ast.toy b/mlir/test/Examples/Toy/Ch5/ast.toy
index 4f45c30f0ad1..9840ea2c5663 100644
--- a/mlir/test/Examples/Toy/Ch5/ast.toy
+++ b/mlir/test/Examples/Toy/Ch5/ast.toy
@@ -31,7 +31,7 @@ def main() {
 
 # CHECK: Module:
 # CHECK-NEXT:     Function
-# CHECK-NEXT:       Proto 'multiply_transpose' @{{.*}}ast.toy:4:1'
+# CHECK-NEXT:       Proto 'multiply_transpose' @{{.*}}ast.toy:4:1
 # CHECK-NEXT:       Params: [a, b]
 # CHECK-NEXT:       Block {
 # CHECK-NEXT:         Return
@@ -44,7 +44,7 @@ def main() {
 # CHECK-NEXT:             ]
 # CHECK-NEXT:       } // Block
 # CHECK-NEXT:     Function
-# CHECK-NEXT:       Proto 'main' @{{.*}}ast.toy:8:1'
+# CHECK-NEXT:       Proto 'main' @{{.*}}ast.toy:8:1
 # CHECK-NEXT:       Params: []
 # CHECK-NEXT:       Block {
 # CHECK-NEXT:         VarDecl a<> @{{.*}}ast.toy:11:3

diff  --git a/mlir/test/Examples/Toy/Ch6/ast.toy b/mlir/test/Examples/Toy/Ch6/ast.toy
index 38eaa1c42805..f5fc2789a2f5 100644
--- a/mlir/test/Examples/Toy/Ch6/ast.toy
+++ b/mlir/test/Examples/Toy/Ch6/ast.toy
@@ -31,7 +31,7 @@ def main() {
 
 # CHECK: Module:
 # CHECK-NEXT:     Function
-# CHECK-NEXT:       Proto 'multiply_transpose' @{{.*}}ast.toy:4:1'
+# CHECK-NEXT:       Proto 'multiply_transpose' @{{.*}}ast.toy:4:1
 # CHECK-NEXT:       Params: [a, b]
 # CHECK-NEXT:       Block {
 # CHECK-NEXT:         Return
@@ -44,7 +44,7 @@ def main() {
 # CHECK-NEXT:             ]
 # CHECK-NEXT:       } // Block
 # CHECK-NEXT:     Function
-# CHECK-NEXT:       Proto 'main' @{{.*}}ast.toy:8:1'
+# CHECK-NEXT:       Proto 'main' @{{.*}}ast.toy:8:1
 # CHECK-NEXT:       Params: []
 # CHECK-NEXT:       Block {
 # CHECK-NEXT:         VarDecl a<> @{{.*}}ast.toy:11:3

diff  --git a/mlir/test/Examples/Toy/Ch7/ast.toy b/mlir/test/Examples/Toy/Ch7/ast.toy
index 05cde0339ae1..878450a6affa 100644
--- a/mlir/test/Examples/Toy/Ch7/ast.toy
+++ b/mlir/test/Examples/Toy/Ch7/ast.toy
@@ -31,7 +31,7 @@ def main() {
 
 # CHECK: Module:
 # CHECK-NEXT:     Function
-# CHECK-NEXT:       Proto 'multiply_transpose' @{{.*}}ast.toy:4:1'
+# CHECK-NEXT:       Proto 'multiply_transpose' @{{.*}}ast.toy:4:1
 # CHECK-NEXT:       Params: [a, b]
 # CHECK-NEXT:       Block {
 # CHECK-NEXT:         Return
@@ -44,7 +44,7 @@ def main() {
 # CHECK-NEXT:             ]
 # CHECK-NEXT:       } // Block
 # CHECK-NEXT:     Function
-# CHECK-NEXT:       Proto 'main' @{{.*}}ast.toy:8:1'
+# CHECK-NEXT:       Proto 'main' @{{.*}}ast.toy:8:1
 # CHECK-NEXT:       Params: []
 # CHECK-NEXT:       Block {
 # CHECK-NEXT:         VarDecl a<> @{{.*}}ast.toy:11:3

diff  --git a/mlir/test/Examples/Toy/Ch7/struct-ast.toy b/mlir/test/Examples/Toy/Ch7/struct-ast.toy
index dee0d5b0efd5..d2ccc5accd1c 100644
--- a/mlir/test/Examples/Toy/Ch7/struct-ast.toy
+++ b/mlir/test/Examples/Toy/Ch7/struct-ast.toy
@@ -27,7 +27,7 @@ def main() {
 # CHECK-NEXT:    VarDecl b<> @{{.*}}struct-ast.toy:5:3
 # CHECK-NEXT:  ]
 # CHECK-NEXT:Function
-# CHECK-NEXT:  Proto 'multiply_transpose' @{{.*}}struct-ast.toy:9:1'
+# CHECK-NEXT:  Proto 'multiply_transpose' @{{.*}}struct-ast.toy:9:1
 # CHECK-NEXT:  Params: [value]
 # CHECK-NEXT:  Block {
 # CHECK-NEXT:    Return
@@ -44,7 +44,7 @@ def main() {
 # CHECK-NEXT:        ]
 # CHECK-NEXT:  }
 # CHECK-NEXT:Function
-# CHECK-NEXT:  Proto 'main' @{{.*}}struct-ast.toy:14:1'
+# CHECK-NEXT:  Proto 'main' @{{.*}}struct-ast.toy:14:1
 # CHECK-NEXT:  Params: []
 # CHECK-NEXT:  Block {
 # CHECK-NEXT:    VarDecl value<Struct> @{{.*}}struct-ast.toy:16:3


        


More information about the Mlir-commits mailing list