Skip to content

Commit d747b16

Browse files
remove unnecessary calls to clear()
1 parent 3c0fe91 commit d747b16

File tree

3 files changed

+3
-19
lines changed

3 files changed

+3
-19
lines changed

vpr/src/route/rr_graph.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,18 +1515,11 @@ static void build_rr_graph(e_graph_type graph_type,
15151515
graph_type,
15161516
is_flat);
15171517

1518-
if (!chan_details_x.empty() || !chan_details_y.empty()) {
1519-
free_chan_details(chan_details_x, chan_details_y);
1520-
}
1521-
15221518
if (sb_conn_map) {
15231519
free_switchblock_permutations(sb_conn_map);
15241520
sb_conn_map = nullptr;
15251521
}
15261522

1527-
track_to_pin_lookup_x.clear();
1528-
track_to_pin_lookup_y.clear();
1529-
15301523
// We are done with building the RR Graph. Thus, we can clear the storages only used
15311524
// to build the RR Graph
15321525
device_ctx.rr_graph_builder.clear_temp_storage();

vpr/src/route/rr_graph2.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -608,12 +608,6 @@ void adjust_seg_details(const int x,
608608
}
609609
}
610610

611-
void free_chan_details(t_chan_details& chan_details_x,
612-
t_chan_details& chan_details_y) {
613-
chan_details_x.clear();
614-
chan_details_y.clear();
615-
}
616-
617611
/* Returns the segment number at which the segment this track lies on
618612
* started. */
619613
int get_seg_start(const t_chan_seg_details* seg_details,
@@ -1093,7 +1087,7 @@ static void load_chan_rr_indices(const int max_chan_width,
10931087
const t_chan_details& chan_details,
10941088
RRGraphBuilder& rr_graph_builder,
10951089
int* index) {
1096-
auto& device_ctx = g_vpr_ctx.device();
1090+
const auto& device_ctx = g_vpr_ctx.device();
10971091

10981092
for (int layer = 0; layer < grid.get_num_layers(); layer++) {
10991093
/* Skip the current die if architecture file specifies that it doesn't require global resource routing */
@@ -1484,8 +1478,8 @@ void alloc_and_load_intra_cluster_rr_node_indices(RRGraphBuilder& rr_graph_build
14841478
for (int layer = 0; layer < grid.get_num_layers(); layer++) {
14851479
for (int x = 0; x < (int)grid.width(); x++) {
14861480
for (int y = 0; y < (int)grid.height(); y++) {
1487-
//Process each block from it's root location
1488-
if (grid.get_width_offset({x, y, layer}) == 0 && grid.get_height_offset({x, y, layer}) == 0) {
1481+
//Process each block from its root location
1482+
if (grid.is_root_location({x, y, layer})) {
14891483
t_physical_tile_type_ptr physical_type = grid.get_physical_type({x, y, layer});
14901484
//Assign indices for SINKs and SOURCEs
14911485
// Note that SINKS/SOURCES have no side, so we always use side 0

vpr/src/route/rr_graph2.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,6 @@ void adjust_seg_details(const int x,
105105
t_chan_details& chan_details,
106106
const enum e_parallel_axis seg_details_type);
107107

108-
void free_chan_details(t_chan_details& chan_details_x,
109-
t_chan_details& chan_details_y);
110-
111108
int get_seg_start(const t_chan_seg_details* seg_details,
112109
const int itrack,
113110
const int chan_num,

0 commit comments

Comments
 (0)