From 5633813bf376ef12056cc8ce34c03c445d0dbce5 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 11 May 2020 16:53:16 -0700 Subject: [PATCH] [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 --- mlir/docs/Tutorials/Toy/Ch-1.md | 2 +- mlir/docs/Tutorials/Toy/Ch-2.md | 2 -- mlir/docs/Tutorials/Toy/Ch-3.md | 2 +- mlir/docs/Tutorials/Toy/Ch-5.md | 4 ++-- mlir/examples/toy/Ch1/parser/AST.cpp | 2 +- mlir/examples/toy/Ch2/include/toy/Ops.td | 2 +- mlir/examples/toy/Ch2/mlir/Dialect.cpp | 5 ++--- mlir/examples/toy/Ch2/parser/AST.cpp | 2 +- mlir/examples/toy/Ch3/include/toy/Ops.td | 2 +- mlir/examples/toy/Ch3/mlir/Dialect.cpp | 5 ++--- mlir/examples/toy/Ch3/parser/AST.cpp | 2 +- mlir/examples/toy/Ch4/include/toy/Ops.td | 2 +- mlir/examples/toy/Ch4/mlir/Dialect.cpp | 5 ++--- mlir/examples/toy/Ch4/parser/AST.cpp | 2 +- mlir/examples/toy/Ch5/include/toy/Ops.td | 2 +- mlir/examples/toy/Ch5/mlir/Dialect.cpp | 5 ++--- mlir/examples/toy/Ch5/parser/AST.cpp | 2 +- mlir/examples/toy/Ch6/include/toy/Ops.td | 2 +- mlir/examples/toy/Ch6/mlir/Dialect.cpp | 5 ++--- mlir/examples/toy/Ch6/parser/AST.cpp | 2 +- mlir/examples/toy/Ch7/include/toy/Ops.td | 2 +- mlir/examples/toy/Ch7/mlir/Dialect.cpp | 5 ++--- mlir/examples/toy/Ch7/parser/AST.cpp | 2 +- mlir/include/mlir/ExecutionEngine/OptUtils.h | 2 +- mlir/test/Examples/Toy/Ch1/ast.toy | 4 ++-- mlir/test/Examples/Toy/Ch2/ast.toy | 4 ++-- mlir/test/Examples/Toy/Ch3/ast.toy | 4 ++-- mlir/test/Examples/Toy/Ch4/ast.toy | 4 ++-- mlir/test/Examples/Toy/Ch5/ast.toy | 4 ++-- mlir/test/Examples/Toy/Ch6/ast.toy | 4 ++-- mlir/test/Examples/Toy/Ch7/ast.toy | 4 ++-- mlir/test/Examples/Toy/Ch7/struct-ast.toy | 4 ++-- 32 files changed, 46 insertions(+), 54 deletions(-) diff --git a/mlir/docs/Tutorials/Toy/Ch-1.md b/mlir/docs/Tutorials/Toy/Ch-1.md index 7c2f499..eebbb78 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 4265b06..1180a9f 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 d6a72b0..5353b58 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 { 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 67fc0f6..ca59da2 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 9bd7876..9315bb1 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 4e06634..14a20a2 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 b60d792..91723c3 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()) 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 9bd7876..9315bb1 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 5a40760..9bf9f8d 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 b60d792..91723c3 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()) 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 9bd7876..9315bb1 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 1cd2080..13970e5 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 02a7021..5a64f0f 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()) 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 9bd7876..9315bb1 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 7e7d5d1..826e980 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 02a7021..5a64f0f 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()) 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 9bd7876..9315bb1 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 dee06c1..cebf464 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 02a7021..5a64f0f 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()) 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 9bd7876..9315bb1 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 b453f13..211cb81 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 d653ede..e77a427 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()) 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 220637d..901d2f2 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 5387920..b33959e 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 f13d690..19f525a 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 5f39937..48bd443 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 b8e4eb0..15ac242 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 c991cc1..d665be5 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 4f45c30..9840ea2 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 38eaa1c..f5fc278 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 05cde03..878450a6 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 dee0d5b..d2ccc5a 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-ast.toy:16:3 -- 2.7.4