Skip to content

Commit 76ab77f

Browse files
committed
Update print-op-graph unit tests
1 parent 9afe411 commit 76ab77f

File tree

3 files changed

+38
-38
lines changed

3 files changed

+38
-38
lines changed

mlir/test/Transforms/print-op-graph-back-edges.mlir

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
// DFG: compound = true;
55
// DFG: subgraph cluster_1 {
66
// DFG: v2 [label = " ", shape = plain];
7-
// DFG: label = "builtin.module : ()\n";
7+
// DFG: label = "builtin.module : ()\l";
88
// DFG: subgraph cluster_3 {
99
// DFG: v4 [label = " ", shape = plain];
1010
// DFG: label = "";
11-
// DFG: v5 [fillcolor = "0.000000 1.0 1.0", label = "arith.addi : (index)\n\noverflowFlags: #arith.overflow<none...", shape = ellipse, style = filled];
12-
// DFG: v6 [fillcolor = "0.333333 1.0 1.0", label = "arith.constant : (index)\n\nvalue: 0 : index", shape = ellipse, style = filled];
13-
// DFG: v7 [fillcolor = "0.333333 1.0 1.0", label = "arith.constant : (index)\n\nvalue: 1 : index", shape = ellipse, style = filled];
11+
// DFG: v5 [fillcolor = "0.000000 0.3 0.95", label = "{{\{\{}}<arg_c0> %c0|<arg_c1> %c1}|arith.addi\l\loverflowFlags: #arith.overflow\<none...\l|{<res_0> %0 index}}", shape = Mrecord, style = filled];
12+
// DFG: v6 [fillcolor = "0.333333 0.3 0.95", label = "{arith.constant\l\lvalue: 0 : index\l|{<res_c0> %c0 index}}", shape = Mrecord, style = filled];
13+
// DFG: v7 [fillcolor = "0.333333 0.3 0.95", label = "{arith.constant\l\lvalue: 1 : index\l|{<res_c1> %c1 index}}", shape = Mrecord, style = filled];
1414
// DFG: }
1515
// DFG: }
16-
// DFG: v6 -> v5 [label = "0", style = solid];
17-
// DFG: v7 -> v5 [label = "1", style = solid];
16+
// DFG: v6:res_c0:s -> v5:arg_c0:n[style = solid];
17+
// DFG: v7:res_c1:s -> v5:arg_c1:n[style = solid];
1818
// DFG: }
1919

2020
module {

mlir/test/Transforms/print-op-graph-cycles.mlir

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,41 @@
44
// DFG: compound = true;
55
// DFG: subgraph cluster_1 {
66
// DFG: v2 [label = " ", shape = plain];
7-
// DFG: label = "builtin.module : ()\n";
7+
// DFG: label = "builtin.module : ()\l";
88
// DFG: subgraph cluster_3 {
99
// DFG: v4 [label = " ", shape = plain];
1010
// DFG: label = "";
1111
// DFG: subgraph cluster_5 {
1212
// DFG: v6 [label = " ", shape = plain];
13-
// DFG: label = "test.graph_region : ()\n";
13+
// DFG: label = "test.graph_region : ()\l";
1414
// DFG: subgraph cluster_7 {
1515
// DFG: v8 [label = " ", shape = plain];
1616
// DFG: label = "";
17-
// DFG: v9 [fillcolor = "0.000000 1.0 1.0", label = "op1 : (i32)\n", shape = ellipse, style = filled];
17+
// DFG: v9 [fillcolor = "0.000000 0.3 0.95", label = "{{\{\{}}<arg_0> %0|<arg_2> %2}|op1\l|{<res_0> %0 i32}}", shape = Mrecord, style = filled];
1818
// DFG: subgraph cluster_10 {
1919
// DFG: v11 [label = " ", shape = plain];
20-
// DFG: label = "test.ssacfg_region : (i32)\n";
20+
// DFG: label = "test.ssacfg_region : (i32)\l";
2121
// DFG: subgraph cluster_12 {
2222
// DFG: v13 [label = " ", shape = plain];
2323
// DFG: label = "";
24-
// DFG: v14 [fillcolor = "0.166667 1.0 1.0", label = "op2 : (i32)\n", shape = ellipse, style = filled];
24+
// DFG: v14 [fillcolor = "0.166667 0.3 0.95", label = "{{\{\{}}<arg_0> %0|<arg_1> %1|<arg_2> %2|<arg_3> %3}|op2\l|{<res_4> %4 i32}}", shape = Mrecord, style = filled];
2525
// DFG: }
2626
// DFG: }
27-
// DFG: v15 [fillcolor = "0.166667 1.0 1.0", label = "op2 : (i32)\n", shape = ellipse, style = filled];
28-
// DFG: v16 [fillcolor = "0.500000 1.0 1.0", label = "op3 : (i32)\n", shape = ellipse, style = filled];
27+
// DFG: v15 [fillcolor = "0.166667 0.3 0.95", label = "{{\{\{}}<arg_0> %0|<arg_3> %3}|op2\l|{<res_2> %2 i32}}", shape = Mrecord, style = filled];
28+
// DFG: v16 [fillcolor = "0.500000 0.3 0.95", label = "{{\{\{}}<arg_0> %0}|op3\l|{<res_3> %3 i32}}", shape = Mrecord, style = filled];
2929
// DFG: }
3030
// DFG: }
3131
// DFG: }
3232
// DFG: }
33-
// DFG: v9 -> v9 [label = "0", style = solid];
34-
// DFG: v15 -> v9 [label = "1", style = solid];
35-
// DFG: v9 -> v14 [label = "0", style = solid];
36-
// DFG: v11 -> v14 [ltail = cluster_10, style = solid];
37-
// DFG: v15 -> v14 [label = "2", style = solid];
38-
// DFG: v16 -> v14 [label = "3", style = solid];
39-
// DFG: v9 -> v15 [label = "0", style = solid];
40-
// DFG: v16 -> v15 [label = "1", style = solid];
41-
// DFG: v9 -> v16 [label = "", style = solid];
33+
// DFG: v9:res_0:s -> v9:arg_0:n[style = solid];
34+
// DFG: v15:res_2:s -> v9:arg_2:n[style = solid];
35+
// DFG: v9:res_0:s -> v14:arg_0:n[style = solid];
36+
// DFG: v11:res_1:s -> v14:arg_1:n[ltail = cluster_10, style = solid];
37+
// DFG: v15:res_2:s -> v14:arg_2:n[style = solid];
38+
// DFG: v16:res_3:s -> v14:arg_3:n[style = solid];
39+
// DFG: v9:res_0:s -> v15:arg_0:n[style = solid];
40+
// DFG: v16:res_3:s -> v15:arg_3:n[style = solid];
41+
// DFG: v9:res_0:s -> v16:arg_0:n[style = solid];
4242
// DFG: }
4343

4444
"test.graph_region"() ({ // A Graph region

mlir/test/Transforms/print-op-graph.mlir

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,49 +6,49 @@
66
// DFG: subgraph {{.*}}
77
// DFG: label = "func.func{{.*}}merge_blocks
88
// DFG: subgraph {{.*}} {
9-
// DFG: v[[ARG0:.*]] [label = "arg0"
9+
// DFG: v[[ARG0:.*]] [label = "<res_arg0> %arg0 i32"
1010
// DFG: v[[CONST10:.*]] [{{.*}}label ={{.*}}10 : i32
1111
// DFG: subgraph [[CLUSTER_MERGE_BLOCKS:.*]] {
1212
// DFG: v[[ANCHOR:.*]] [label = " ", shape = plain]
1313
// DFG: label = "test.merge_blocks
1414
// DFG: subgraph {{.*}} {
15-
// DFG: v[[TEST_BR:.*]] [{{.*}}label = "test.br
15+
// DFG: v[[TEST_BR:.*]] [{{.*}}label = "{{.*}}test.br
1616
// DFG: }
1717
// DFG: subgraph {{.*}} {
1818
// DFG: }
1919
// DFG: }
20-
// DFG: v[[TEST_RET:.*]] [{{.*}}label = "test.return
21-
// DFG: v[[ARG0]] -> v[[TEST_BR]]
22-
// DFG: v[[CONST10]] -> v[[TEST_BR]]
23-
// DFG: v[[ANCHOR]] -> v[[TEST_RET]] [ltail = [[CLUSTER_MERGE_BLOCKS]], style = solid];
24-
// DFG: v[[ANCHOR]] -> v[[TEST_RET]] [ltail = [[CLUSTER_MERGE_BLOCKS]], style = solid];
20+
// DFG: v[[TEST_RET:.*]] [{{.*}}label = "{{.*}}test.return
21+
// DFG: v[[ARG0]]:res_arg0:s -> v[[TEST_BR]]:arg_arg0:n
22+
// DFG: v[[CONST10]]:res_c10_i32:s -> v[[TEST_BR]]
23+
// DFG: v[[ANCHOR]]:res_1_0:s -> v[[TEST_RET]]:arg_1_0:n[ltail = [[CLUSTER_MERGE_BLOCKS]], style = solid];
24+
// DFG: v[[ANCHOR]]:res_1_1:s -> v[[TEST_RET]]:arg_1_1:n[ltail = [[CLUSTER_MERGE_BLOCKS]], style = solid];
2525

2626
// CFG-LABEL: digraph G {
2727
// CFG: subgraph {{.*}} {
2828
// CFG: subgraph {{.*}}
2929
// CFG: label = "func.func{{.*}}merge_blocks
3030
// CFG: subgraph {{.*}} {
31-
// CFG: v[[C1:.*]] [{{.*}}label = "arith.constant
32-
// CFG: v[[C2:.*]] [{{.*}}label = "arith.constant
33-
// CFG: v[[C3:.*]] [{{.*}}label = "arith.constant
34-
// CFG: v[[C4:.*]] [{{.*}}label = "arith.constant
35-
// CFG: v[[TEST_FUNC:.*]] [{{.*}}label = "test.func
31+
// CFG: v[[C1:.*]] [{{.*}}label = "{arith.constant
32+
// CFG: v[[C2:.*]] [{{.*}}label = "{arith.constant
33+
// CFG: v[[C3:.*]] [{{.*}}label = "{arith.constant
34+
// CFG: v[[C4:.*]] [{{.*}}label = "{arith.constant
35+
// CFG: v[[TEST_FUNC:.*]] [{{.*}}label = "{test.func
3636
// CFG: subgraph [[CLUSTER_MERGE_BLOCKS:.*]] {
3737
// CFG: v[[ANCHOR:.*]] [label = " ", shape = plain]
3838
// CFG: label = "test.merge_blocks
3939
// CFG: subgraph {{.*}} {
40-
// CFG: v[[TEST_BR:.*]] [{{.*}}label = "test.br
40+
// CFG: v[[TEST_BR:.*]] [{{.*}}label = "{{.*}}test.br
4141
// CFG: }
4242
// CFG: subgraph {{.*}} {
4343
// CFG: }
4444
// CFG: }
45-
// CFG: v[[TEST_RET:.*]] [{{.*}}label = "test.return
45+
// CFG: v[[TEST_RET:.*]] [{{.*}}label = "{{.*}}test.return
4646
// CFG: v[[C1]] -> v[[C2]]
4747
// CFG: v[[C2]] -> v[[C3]]
4848
// CFG: v[[C3]] -> v[[C4]]
4949
// CFG: v[[C4]] -> v[[TEST_FUNC]]
50-
// CFG: v[[TEST_FUNC]] -> v[[ANCHOR]] [lhead = [[CLUSTER_MERGE_BLOCKS]], style = dashed];
51-
// CFG: v[[ANCHOR]] -> v[[TEST_RET]] [ltail = [[CLUSTER_MERGE_BLOCKS]], style = dashed];
50+
// CFG: v[[TEST_FUNC]] -> v[[ANCHOR]][lhead = [[CLUSTER_MERGE_BLOCKS]], style = dashed];
51+
// CFG: v[[ANCHOR]] -> v[[TEST_RET]][ltail = [[CLUSTER_MERGE_BLOCKS]], style = dashed];
5252

5353
func.func @merge_blocks(%arg0: i32, %arg1 : i32) -> () {
5454
%0 = arith.constant dense<[[0, 1], [2, 3]]> : tensor<2x2xi32>

0 commit comments

Comments
 (0)