[Mlir-commits] [mlir] 6b8edc9 - [mlir] Fix disagreement between document and test(NFC) (#109257)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Sep 19 18:26:01 PDT 2024
Author: csstormq
Date: 2024-09-20T09:25:57+08:00
New Revision: 6b8edc9f7933d59ababd34ff040fab3d16cb3e3b
URL: https://github.com/llvm/llvm-project/commit/6b8edc9f7933d59ababd34ff040fab3d16cb3e3b
DIFF: https://github.com/llvm/llvm-project/commit/6b8edc9f7933d59ababd34ff040fab3d16cb3e3b.diff
LOG: [mlir] Fix disagreement between document and test(NFC) (#109257)
Added:
Modified:
mlir/docs/Tutorials/UnderstandingTheIRStructure.md
mlir/test/IR/print-ir-nesting.mlir
Removed:
################################################################################
diff --git a/mlir/docs/Tutorials/UnderstandingTheIRStructure.md b/mlir/docs/Tutorials/UnderstandingTheIRStructure.md
index ed323fc42336bc..de8e0bea57921c 100644
--- a/mlir/docs/Tutorials/UnderstandingTheIRStructure.md
+++ b/mlir/docs/Tutorials/UnderstandingTheIRStructure.md
@@ -97,12 +97,12 @@ llvm-project/mlir/test/IR/print-ir-nesting.mlir`:
```mlir
"builtin.module"() ( {
- %0:4 = "dialect.op1"() {"attribute name" = 42 : i32} : () -> (i1, i16, i32, i64)
+ %results:4 = "dialect.op1"() {"attribute name" = 42 : i32} : () -> (i1, i16, i32, i64)
"dialect.op2"() ( {
- "dialect.innerop1"(%0#0, %0#1) : (i1, i16) -> ()
+ "dialect.innerop1"(%results#0, %results#1) : (i1, i16) -> ()
}, {
"dialect.innerop2"() : () -> ()
- "dialect.innerop3"(%0#0, %0#2, %0#3)[^bb1, ^bb2] : (i1, i32, i64) -> ()
+ "dialect.innerop3"(%results#0, %results#2, %results#3)[^bb1, ^bb2] : (i1, i32, i64) -> ()
^bb1(%1: i32): // pred: ^bb0
"dialect.innerop4"() : () -> ()
"dialect.innerop5"() : () -> ()
@@ -125,6 +125,8 @@ visiting op: 'builtin.module' with 0 operands and 0 results
- 'attribute name' : '42 : i32'
0 nested regions:
visiting op: 'dialect.op2' with 0 operands and 0 results
+ 1 attributes:
+ - 'other attribute' : '42 : i64'
2 nested regions:
Region with 1 blocks:
Block with 0 arguments, 0 successors, and 1 operations
@@ -146,7 +148,6 @@ visiting op: 'builtin.module' with 0 operands and 0 results
0 nested regions:
visiting op: 'dialect.innerop7' with 0 operands and 0 results
0 nested regions:
- 0 nested regions:
```
## Other IR Traversal Methods
diff --git a/mlir/test/IR/print-ir-nesting.mlir b/mlir/test/IR/print-ir-nesting.mlir
index 6afbfd918b5373..7d5fa31bfde794 100644
--- a/mlir/test/IR/print-ir-nesting.mlir
+++ b/mlir/test/IR/print-ir-nesting.mlir
@@ -4,7 +4,7 @@
// CHECK: 1 nested regions:
// CHECK: Region with 1 blocks:
// CHECK: Block with 0 arguments, 0 successors, and 2 operations
-module {
+"builtin.module"() ( {
// CHECK: visiting op: 'dialect.op1' with 0 operands and 4 results
@@ -15,6 +15,8 @@ module {
// CHECK: visiting op: 'dialect.op2' with 0 operands and 0 results
+// CHECK: 1 attributes:
+// CHECK: - 'other attribute' : '42 : i64'
// CHECK: 2 nested regions:
"dialect.op2"() ({
@@ -50,6 +52,5 @@ module {
// CHECK: visiting op: 'dialect.innerop7' with 0 operands and 0 results
// CHECK: 0 nested regions:
"dialect.innerop7"() : () -> ()
- }) : () -> ()
-
-} // module
+ }) {"other attribute" = 42 : i64} : () -> ()
+}) : () -> ()
More information about the Mlir-commits
mailing list