@@ -25,11 +25,17 @@ static bool relevant_node_to_target(const RRGraphView* rr_graph,
2525 RRNodeId node_to_add,
2626 RRNodeId target_node);
2727
28- static void update_router_stats (const DeviceContext& device_ctx,
29- const RRGraphView* rr_graph,
30- RouterStats* router_stats,
31- RRNodeId rr_node_id,
32- bool is_push);
28+ #ifdef VTR_ENABLE_DEBUG_LOGGING
29+ static void update_router_stats (const RRGraphView* rr_graph,
30+ RouterStats* router_stats,
31+ RRNodeId rr_node_id,
32+ bool is_push);
33+ #else
34+ static void update_router_stats (const RRGraphView* /* rr_graph*/ ,
35+ RouterStats* router_stats,
36+ RRNodeId /* rr_node_id*/ ,
37+ bool is_push);
38+ #endif
3339
3440/* * return tuple <found_path, retry_with_full_bb, cheapest> */
3541template <typename Heap>
@@ -214,8 +220,7 @@ t_heap* ConnectionRouter<Heap>::timing_driven_route_connection_from_heap(RRNodeI
214220 while (!heap_.is_empty_heap ()) {
215221 // cheapest t_heap in current route tree to be expanded on
216222 cheapest = heap_.get_heap_head ();
217- update_router_stats (device_ctx,
218- rr_graph_,
223+ update_router_stats (rr_graph_,
219224 router_stats_,
220225 cheapest->index ,
221226 false );
@@ -304,8 +309,7 @@ vtr::vector<RRNodeId, t_heap> ConnectionRouter<Heap>::timing_driven_find_all_sho
304309 while (!heap_.is_empty_heap ()) {
305310 // cheapest t_heap in current route tree to be expanded on
306311 t_heap* cheapest = heap_.get_heap_head ();
307- update_router_stats (g_vpr_ctx.device (),
308- rr_graph_,
312+ update_router_stats (rr_graph_,
309313 router_stats_,
310314 cheapest->index ,
311315 false );
@@ -613,8 +617,7 @@ void ConnectionRouter<Heap>::timing_driven_add_to_heap(const t_conn_cost_params
613617 }
614618
615619 heap_.add_to_heap (next_ptr);
616- update_router_stats (device_ctx,
617- rr_graph_,
620+ update_router_stats (rr_graph_,
618621 router_stats_,
619622 to_node,
620623 true );
@@ -927,8 +930,7 @@ void ConnectionRouter<Heap>::add_route_tree_node_to_heap(
927930 backward_path_cost, R_upstream, rt_node.Tdel , &rcv_path_manager);
928931 }
929932
930- update_router_stats (device_ctx,
931- rr_graph_,
933+ update_router_stats (rr_graph_,
932934 router_stats_,
933935 inode,
934936 true );
@@ -1098,18 +1100,25 @@ static inline bool relevant_node_to_target(const RRGraphView* rr_graph,
10981100 return false ;
10991101}
11001102
1101- static inline void update_router_stats ( const DeviceContext& device_ctx,
1102- const RRGraphView* rr_graph,
1103+ # ifdef VTR_ENABLE_DEBUG_LOGGING
1104+ static inline void update_router_stats ( const RRGraphView* rr_graph,
11031105 RouterStats* router_stats,
11041106 RRNodeId rr_node_id,
11051107 bool is_push) {
1108+ #else
1109+ static inline void update_router_stats (const RRGraphView* /* rr_graph*/ ,
1110+ RouterStats* router_stats,
1111+ RRNodeId /* rr_node_id*/ ,
1112+ bool is_push) {
1113+ #endif
11061114 if (is_push) {
11071115 router_stats->heap_pushes ++;
11081116 } else {
11091117 router_stats->heap_pops ++;
11101118 }
11111119
11121120#ifdef VTR_ENABLE_DEBUG_LOGGING
1121+ const auto & device_ctx = g_vpr_ctx.device ();
11131122 auto node_type = rr_graph->node_type (rr_node_id);
11141123 VTR_ASSERT (node_type != NUM_RR_TYPES);
11151124 t_physical_tile_type_ptr physical_type = device_ctx.grid .get_physical_type ({rr_graph->node_xlow (rr_node_id),
0 commit comments