@@ -193,7 +193,6 @@ t_heap* ConnectionRouter<Heap>::timing_driven_route_connection_from_heap(RRNodeI
193
193
VTR_LOGV_DEBUG (router_debug_, " Initial heap empty (no source)\n " );
194
194
}
195
195
196
- const auto & device_ctx = g_vpr_ctx.device ();
197
196
auto & route_ctx = g_vpr_ctx.mutable_routing ();
198
197
199
198
t_heap* cheapest = nullptr ;
@@ -217,6 +216,8 @@ t_heap* ConnectionRouter<Heap>::timing_driven_route_connection_from_heap(RRNodeI
217
216
if (rcv_path_manager.is_enabled ()) {
218
217
rcv_path_manager.insert_backwards_path_into_traceback (cheapest->path_data , cheapest->cost , cheapest->backward_path_cost , route_ctx);
219
218
}
219
+ const auto & device_ctx = g_vpr_ctx.device ();
220
+ static_cast <void >(device_ctx); // Ignore unused variable when logging is disabled.
220
221
VTR_LOGV_DEBUG (router_debug_, " Found target %8d (%s)\n " , inode, describe_rr_node (device_ctx.rr_graph , device_ctx.grid , device_ctx.rr_indexed_data , inode, is_flat_).c_str ());
221
222
break ;
222
223
}
@@ -525,7 +526,6 @@ void ConnectionRouter<Heap>::timing_driven_add_to_heap(const t_conn_cost_params&
525
526
RRNodeId to_node,
526
527
const RREdgeId from_edge,
527
528
RRNodeId target_node) {
528
- const auto & device_ctx = g_vpr_ctx.device ();
529
529
t_heap next;
530
530
531
531
// Initalize RCV data struct if needed, otherwise it's set to nullptr
@@ -557,6 +557,8 @@ void ConnectionRouter<Heap>::timing_driven_add_to_heap(const t_conn_cost_params&
557
557
float new_back_cost = next.backward_path_cost ;
558
558
559
559
if (new_total_cost < best_total_cost && ((rcv_path_manager.is_enabled ()) || (new_back_cost < best_back_cost))) {
560
+ const auto & device_ctx = g_vpr_ctx.device ();
561
+ static_cast <void >(device_ctx); // Ignore unused variable when logging is disabled.
560
562
VTR_LOGV_DEBUG (router_debug_, " Expanding to node %d (%s)\n " , to_node,
561
563
describe_rr_node (device_ctx.rr_graph ,
562
564
device_ctx.grid ,
@@ -596,6 +598,8 @@ void ConnectionRouter<Heap>::timing_driven_add_to_heap(const t_conn_cost_params&
596
598
rr_graph_);
597
599
598
600
} else {
601
+ const auto & device_ctx = g_vpr_ctx.device ();
602
+ static_cast <void >(device_ctx); // Ignore unused variable when logging is disabled.
599
603
VTR_LOGV_DEBUG (router_debug_, " Didn't expand to %d (%s)\n " , to_node, describe_rr_node (device_ctx.rr_graph , device_ctx.grid , device_ctx.rr_indexed_data , to_node, is_flat_).c_str ());
600
604
VTR_LOGV_DEBUG (router_debug_, " Prev Total Cost %g Prev back Cost %g \n " , best_total_cost, best_back_cost);
601
605
VTR_LOGV_DEBUG (router_debug_, " New Total Cost %g New back Cost %g \n " , new_total_cost, new_back_cost);
@@ -783,12 +787,13 @@ void ConnectionRouter<Heap>::evaluate_timing_driven_node_costs(t_heap* to,
783
787
784
788
total_cost = compute_node_cost_using_rcv (cost_params, to_node, target_node, to->path_data ->backward_delay , to->path_data ->backward_cong , to->R_upstream );
785
789
} else {
786
- const auto & device_ctx = g_vpr_ctx.device ();
787
790
// Update total cost
788
791
float expected_cost = router_lookahead_.get_expected_cost (to_node,
789
792
target_node,
790
793
cost_params,
791
794
to->R_upstream );
795
+ const auto & device_ctx = g_vpr_ctx.device ();
796
+ static_cast <void >(device_ctx); // Ignore unused variable when logging is disabled.
792
797
VTR_LOGV_DEBUG (router_debug_ && !std::isfinite (expected_cost),
793
798
" Lookahead from %s (%s) to %s (%s) is non-finite, expected_cost = %f, to->R_upstream = %f\n " ,
794
799
rr_node_arch_name (to_node, is_flat_).c_str (),
@@ -871,7 +876,6 @@ void ConnectionRouter<Heap>::add_route_tree_node_to_heap(
871
876
RRNodeId target_node,
872
877
const t_conn_cost_params& cost_params,
873
878
const t_bb& net_bb) {
874
- const auto & device_ctx = g_vpr_ctx.device ();
875
879
const RRNodeId inode = rt_node.inode ;
876
880
float backward_path_cost = cost_params.criticality * rt_node.Tdel ;
877
881
float R_upstream = rt_node.R_upstream ;
@@ -894,6 +898,8 @@ void ConnectionRouter<Heap>::add_route_tree_node_to_heap(
894
898
target_node,
895
899
cost_params,
896
900
R_upstream);
901
+ const auto & device_ctx = g_vpr_ctx.device ();
902
+ static_cast <void >(device_ctx); // Ignore unused variable when logging is disabled.
897
903
VTR_LOGV_DEBUG (router_debug_, " Adding node %8d to heap from init route tree with cost %g (%s)\n " ,
898
904
inode,
899
905
tot_cost,
0 commit comments