Skip to content

Commit 35806ad

Browse files
committed
Don't use ports when edges attach to clusters.
1 parent 768d032 commit 35806ad

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

mlir/lib/Transforms/ViewOpGraph.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,12 @@ class PrintOpPass : public impl::ViewOpGraphBase<PrintOpPass> {
247247

248248
edges.push_back(strFromOs([&](raw_ostream &os) {
249249
os << "v" << n1.id;
250-
if (!port.empty())
250+
if (!port.empty() && !n1.clusterId)
251251
// Attach edge to south compass point of the result
252252
os << ":res" << port << ":s";
253253
os << " -> ";
254254
os << "v" << n2.id;
255-
if (!port.empty())
255+
if (!port.empty() && !n2.clusterId)
256256
// Attach edge to north compass point of the operand
257257
os << ":arg" << port << ":n";
258258
emitAttrList(os, attrs);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
// DFG: v9:res_0:s -> v9:arg_0:n[style = solid];
3434
// DFG: v15:res_2:s -> v9:arg_2:n[style = solid];
3535
// 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];
36+
// DFG: v11 -> v14:arg_1:n[ltail = cluster_10, style = solid];
3737
// DFG: v15:res_2:s -> v14:arg_2:n[style = solid];
3838
// DFG: v16:res_3:s -> v14:arg_3:n[style = solid];
3939
// DFG: v9:res_0:s -> v15:arg_0:n[style = solid];

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
// DFG: v[[TEST_RET:.*]] [{{.*}}label = "{{.*}}test.return
2121
// DFG: v[[ARG0]]:res_arg0:s -> v[[TEST_BR]]:arg_arg0:n
2222
// 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];
23+
// DFG: v[[ANCHOR]] -> v[[TEST_RET]]:arg_1_0:n[ltail = [[CLUSTER_MERGE_BLOCKS]], style = solid];
24+
// DFG: v[[ANCHOR]] -> v[[TEST_RET]]:arg_1_1:n[ltail = [[CLUSTER_MERGE_BLOCKS]], style = solid];
2525

2626
// CFG-LABEL: digraph G {
2727
// CFG: subgraph {{.*}} {

0 commit comments

Comments
 (0)