Skip to content

Commit 0541ea2

Browse files
author
Nathan Shreve
committed
Slight order change in set_sink_locs
1 parent fbbddda commit 0541ea2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

libs/librrgraph/src/base/rr_graph_utils.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,18 +161,17 @@ void set_sink_locs(const RRGraphView& rr_graph, RRGraphBuilder& rr_graph_builder
161161
for (size_t node = 0; node < rr_graph.num_nodes(); ++node) {
162162
auto node_id = RRNodeId(node);
163163

164-
// Assume node is SINK, and skip if tile dimensions are 1x1
164+
if (rr_graph.node_type((RRNodeId)node_id) != e_rr_type::SINK)
165+
continue;
166+
167+
// Skip if tile dimensions are 1x1
165168
int tile_width = rr_graph.node_xhigh(node_id) - rr_graph.node_xlow(node_id);
166169
int tile_height = rr_graph.node_yhigh(node_id) - rr_graph.node_ylow(node_id);
167170

168171
if (tile_width <= 1 && tile_height <= 1)
169172
continue;
170173

171-
if (rr_graph.node_type((RRNodeId)node_id) == e_rr_type::SINK) {
172-
sink_ipins[node_id] = {};
173-
} else
174-
continue;
175-
174+
sink_ipins[node_id] = {};
176175
walk_cluster_recursive(rr_graph, node_fanins, sink_ipins, node_id, node_id);
177176
}
178177

0 commit comments

Comments
 (0)