Skip to content

Commit 544d175

Browse files
remove unused #includes
1 parent a26f328 commit 544d175

File tree

6 files changed

+86
-95
lines changed

6 files changed

+86
-95
lines changed

libs/libarchfpga/src/read_xml_arch_file.cpp

Lines changed: 76 additions & 73 deletions
Large diffs are not rendered by default.

vpr/src/base/SetupVPR.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ static void SetupRoutingArch(const t_arch& Arch,
399399
RoutingArch->R_minW_pmos = Arch.R_minW_pmos;
400400
RoutingArch->Fs = Arch.Fs;
401401
RoutingArch->directionality = BI_DIRECTIONAL;
402-
if (Arch.Segments.size()) {
402+
if (!Arch.Segments.empty()) {
403403
RoutingArch->directionality = Arch.Segments[0].directionality;
404404
}
405405

vpr/src/base/read_blif.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ struct BlifAllocCallback : public blifparse::Callback {
582582
} else {
583583
VTR_ASSERT(blif_model.block_type(blk_id) == AtomBlockType::OUTPAD);
584584

585-
auto raw_output_name = blif_model.block_name(blk_id);
585+
const auto& raw_output_name = blif_model.block_name(blk_id);
586586

587587
std::string output_name = vtr::replace_first(raw_output_name, OUTPAD_NAME_PREFIX, "");
588588

vpr/src/base/read_circuit.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,22 +191,22 @@ static void show_circuit_stats(const AtomNetlist& netlist) {
191191

192192
//Determine the maximum length of a type name for nice formatting
193193
size_t max_block_type_len = 0;
194-
for (auto kv : block_type_counts) {
194+
for (const auto& kv : block_type_counts) {
195195
max_block_type_len = std::max(max_block_type_len, kv.first.size());
196196
}
197197
size_t max_net_type_len = 0;
198-
for (auto kv : net_stats) {
198+
for (const auto& kv : net_stats) {
199199
max_net_type_len = std::max(max_net_type_len, kv.first.size());
200200
}
201201

202202
//Print the statistics
203203
VTR_LOG("Circuit Statistics:\n");
204204
VTR_LOG(" Blocks: %zu\n", netlist.blocks().size());
205-
for (auto kv : block_type_counts) {
205+
for (const auto& kv : block_type_counts) {
206206
VTR_LOG(" %-*s: %7zu\n", max_block_type_len, kv.first.c_str(), kv.second);
207207
}
208208
VTR_LOG(" Nets : %zu\n", netlist.nets().size());
209-
for (auto kv : net_stats) {
209+
for (const auto& kv : net_stats) {
210210
VTR_LOG(" %-*s: %7.1f\n", max_net_type_len, kv.first.c_str(), kv.second);
211211
}
212212
VTR_LOG(" Netlist Clocks: %zu\n", find_netlist_logical_clock_drivers(netlist).size());

vpr/src/base/vpr_api.cpp

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,13 @@
1313

1414
#include <cstdio>
1515
#include <cstring>
16-
#include <ctime>
17-
#include <chrono>
1816
#include <cmath>
19-
#include <sstream>
2017

2118
#include "vtr_assert.h"
2219
#include "vtr_math.h"
2320
#include "vtr_log.h"
2421
#include "vtr_version.h"
2522
#include "vtr_time.h"
26-
#include "vtr_path.h"
2723

2824
#include "vpr_types.h"
2925
#include "vpr_utils.h"
@@ -44,15 +40,12 @@
4440
#include "stats.h"
4541
#include "read_options.h"
4642
#include "echo_files.h"
47-
#include "read_xml_arch_file.h"
4843
#include "SetupVPR.h"
4944
#include "ShowSetup.h"
5045
#include "CheckArch.h"
5146
#include "CheckSetup.h"
5247
#include "rr_graph.h"
5348
#include "pb_type_graph.h"
54-
#include "route_common.h"
55-
#include "timing_place_lookup.h"
5649
#include "route.h"
5750
#include "route_export.h"
5851
#include "vpr_api.h"
@@ -65,7 +58,6 @@
6558
#include "concrete_timing_info.h"
6659
#include "netlist_writer.h"
6760
#include "AnalysisDelayCalculator.h"
68-
#include "RoutingDelayCalculator.h"
6961
#include "check_route.h"
7062
#include "constant_nets.h"
7163
#include "atom_netlist_utils.h"
@@ -86,15 +78,12 @@
8678
#include "tatum/echo_writer.hpp"
8779

8880
#include "read_route.h"
89-
#include "read_blif.h"
9081
#include "read_place.h"
9182

9283
#include "arch_util.h"
9384

9485
#include "post_routing_pb_pin_fixup.h"
9586

96-
#include "log.h"
97-
#include "iostream"
9887

9988
#ifdef VPR_USE_TBB
10089
# define TBB_PREVIEW_GLOBAL_CONTROL 1 /* Needed for compatibility with old TBB versions */
@@ -392,7 +381,6 @@ bool vpr_flow(t_vpr_setup& vpr_setup, t_arch& arch) {
392381
bool place_success = vpr_place_flow(placement_net_list, vpr_setup, arch);
393382

394383
if (!place_success) {
395-
std::cout << "failed placement" << std::endl;
396384
return false; //Unimplementable
397385
}
398386
}
@@ -507,7 +495,7 @@ void vpr_create_device_grid(const t_vpr_setup& vpr_setup, const t_arch& Arch) {
507495
if (!device_ctx.grid.limiting_resources().empty()) {
508496
std::vector<std::string> limiting_block_names;
509497
for (auto blk_type : device_ctx.grid.limiting_resources()) {
510-
limiting_block_names.push_back(blk_type->name);
498+
limiting_block_names.emplace_back(blk_type->name);
511499
}
512500
VTR_LOG("FPGA size limited by block type(s): %s\n", vtr::join(limiting_block_names, " ").c_str());
513501
VTR_LOG("\n");
@@ -1360,7 +1348,7 @@ bool vpr_analysis_flow(const Netlist<>& net_list,
13601348
Arch.architecture_id,
13611349
post_routing_packing_output_file_name.c_str());
13621350
} else {
1363-
VTR_LOG_WARN("Sychronization between packing and routing results is not applied due to illegal circuit implementation\n");
1351+
VTR_LOG_WARN("Synchronization between packing and routing results is not applied due to illegal circuit implementation\n");
13641352
}
13651353
VTR_LOG("\n");
13661354
}

vpr/src/place/move_utils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void report_aborted_moves() {
2828
if (f_move_abort_reasons.empty()) {
2929
VTR_LOG(" No moves aborted\n");
3030
}
31-
for (auto kv : f_move_abort_reasons) {
31+
for (const auto& kv : f_move_abort_reasons) {
3232
VTR_LOG(" %s: %zu\n", kv.first.c_str(), kv.second);
3333
}
3434
}
@@ -1008,7 +1008,7 @@ void compressed_grid_to_loc(t_logical_block_type_ptr blk_type,
10081008
auto& grid = g_vpr_ctx.device().grid;
10091009
auto to_type = grid.get_physical_type({grid_loc.x, grid_loc.y, grid_loc.layer_num});
10101010

1011-
//Each x/y location contains only a single type, so we can pick a random z (capcity) location
1011+
//Each x/y location contains only a single type, so we can pick a random z (capacity) location
10121012
auto& compatible_sub_tiles = compressed_block_grid.compatible_sub_tile_num(to_type->index);
10131013
int sub_tile = compatible_sub_tiles[vtr::irand((int)compatible_sub_tiles.size() - 1)];
10141014

0 commit comments

Comments
 (0)