Skip to content

[mlir] Fix disagreement between document and test(NFC) #109257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions mlir/docs/Tutorials/UnderstandingTheIRStructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"() : () -> ()
Expand All @@ -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
Expand All @@ -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
Expand Down
9 changes: 5 additions & 4 deletions mlir/test/IR/print-ir-nesting.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"() ({

Expand Down Expand Up @@ -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} : () -> ()
}) : () -> ()
Loading