From 8f770d000ca9a417c85a6b8aeedc780ee7fcde55 Mon Sep 17 00:00:00 2001 From: AlexandreSinger Date: Sat, 17 May 2025 15:53:51 -0400 Subject: [PATCH] [Infra] Cleaned Up Header Files in Pack Folder Went through the header files in the pack folder and resolved any unused header files. --- vpr/src/pack/atom_pb_bimap.cpp | 1 - vpr/src/pack/cluster_feasibility_filter.cpp | 6 +----- vpr/src/pack/cluster_feasibility_filter.h | 3 ++- vpr/src/pack/cluster_placement.cpp | 1 - vpr/src/pack/cluster_router.cpp | 1 - vpr/src/pack/cluster_router.h | 4 ++++ vpr/src/pack/cluster_util.cpp | 1 - vpr/src/pack/pack_report.cpp | 1 - vpr/src/pack/pack_types.h | 3 +-- vpr/src/pack/pb_type_graph.cpp | 4 ---- vpr/src/pack/pb_type_graph.h | 2 ++ vpr/src/pack/pb_type_graph_annotations.cpp | 8 ++------ vpr/src/pack/pb_type_graph_annotations.h | 2 ++ vpr/src/pack/sync_netlists_to_routing_flat.h | 2 -- vpr/src/pack/verify_flat_placement.cpp | 1 - 15 files changed, 14 insertions(+), 26 deletions(-) diff --git a/vpr/src/pack/atom_pb_bimap.cpp b/vpr/src/pack/atom_pb_bimap.cpp index df837cfea6b..bb9cb70946f 100644 --- a/vpr/src/pack/atom_pb_bimap.cpp +++ b/vpr/src/pack/atom_pb_bimap.cpp @@ -8,7 +8,6 @@ */ #include "atom_pb_bimap.h" -#include "atom_netlist.h" AtomPBBimap::AtomPBBimap(const vtr::bimap& atom_to_pb) { atom_to_pb_ = atom_to_pb; diff --git a/vpr/src/pack/cluster_feasibility_filter.cpp b/vpr/src/pack/cluster_feasibility_filter.cpp index dec597aa41e..86e4d13906b 100644 --- a/vpr/src/pack/cluster_feasibility_filter.cpp +++ b/vpr/src/pack/cluster_feasibility_filter.cpp @@ -28,16 +28,12 @@ */ #include +#include "physical_types.h" #include "vtr_assert.h" #include "vtr_log.h" -#include "vtr_memory.h" -#include "read_xml_arch_file.h" -#include "vpr_types.h" -#include "globals.h" #include "hash.h" #include "cluster_feasibility_filter.h" -#include "vpr_utils.h" /* header functions that identify pin classes */ static void alloc_pin_classes_in_pb_graph_node(t_pb_graph_node* pb_graph_node); diff --git a/vpr/src/pack/cluster_feasibility_filter.h b/vpr/src/pack/cluster_feasibility_filter.h index b6c9cebffd5..e56f3a67a90 100644 --- a/vpr/src/pack/cluster_feasibility_filter.h +++ b/vpr/src/pack/cluster_feasibility_filter.h @@ -21,7 +21,8 @@ #ifndef CLUSTER_FEASIBILITY_CHECK_H #define CLUSTER_FEASIBILITY_CHECK_H -#include "arch_types.h" + +class t_pb_graph_node; void load_pin_classes_in_pb_graph_head(t_pb_graph_node* pb_graph_node); diff --git a/vpr/src/pack/cluster_placement.cpp b/vpr/src/pack/cluster_placement.cpp index 297212c4ff1..fb2cb5298f5 100644 --- a/vpr/src/pack/cluster_placement.cpp +++ b/vpr/src/pack/cluster_placement.cpp @@ -21,7 +21,6 @@ #include "hash.h" #include "physical_types.h" #include "prepack.h" -#include "vpr_types.h" #include "vpr_utils.h" #include "vtr_assert.h" diff --git a/vpr/src/pack/cluster_router.cpp b/vpr/src/pack/cluster_router.cpp index db2c58d6da9..1f08f5d3ea1 100644 --- a/vpr/src/pack/cluster_router.cpp +++ b/vpr/src/pack/cluster_router.cpp @@ -24,7 +24,6 @@ #include "vpr_error.h" #include "vpr_types.h" -#include "echo_files.h" #include "physical_types.h" #include "globals.h" diff --git a/vpr/src/pack/cluster_router.h b/vpr/src/pack/cluster_router.h index cd68f7eea38..40d689b514d 100644 --- a/vpr/src/pack/cluster_router.h +++ b/vpr/src/pack/cluster_router.h @@ -6,9 +6,13 @@ */ #ifndef CLUSTER_ROUTER_H #define CLUSTER_ROUTER_H + #include #include "atom_netlist_fwd.h" +#include "atom_pb_bimap.h" #include "pack_types.h" +#include "vpr_types.h" +#include "vpr_utils.h" /* Constructors/Destructors */ t_lb_router_data* alloc_and_load_router_data(std::vector* lb_type_graph, t_logical_block_type_ptr type); diff --git a/vpr/src/pack/cluster_util.cpp b/vpr/src/pack/cluster_util.cpp index 1ed359ca0c1..60c67f3c7d1 100644 --- a/vpr/src/pack/cluster_util.cpp +++ b/vpr/src/pack/cluster_util.cpp @@ -12,7 +12,6 @@ #include "prepack.h" #include "vpr_context.h" #include "vtr_vector.h" -#include "vtr_vector_map.h" /*Print the contents of each cluster to an echo file*/ static void echo_clusters(char* filename, const ClusterLegalizer& cluster_legalizer) { diff --git a/vpr/src/pack/pack_report.cpp b/vpr/src/pack/pack_report.cpp index 2dded7cda8b..154b75258a0 100644 --- a/vpr/src/pack/pack_report.cpp +++ b/vpr/src/pack/pack_report.cpp @@ -2,7 +2,6 @@ #include "vtr_ostream_guard.h" -#include "vpr_types.h" #include "vpr_utils.h" #include "histogram.h" diff --git a/vpr/src/pack/pack_types.h b/vpr/src/pack/pack_types.h index 8ebaf22b26b..994dbd73f1f 100644 --- a/vpr/src/pack/pack_types.h +++ b/vpr/src/pack/pack_types.h @@ -10,9 +10,8 @@ #include #include -#include "arch_types.h" #include "atom_netlist_fwd.h" -#include "attraction_groups.h" +#include "physical_types.h" struct t_pack_molecule; diff --git a/vpr/src/pack/pb_type_graph.cpp b/vpr/src/pack/pb_type_graph.cpp index 6bd874f6e2b..62055d7e192 100644 --- a/vpr/src/pack/pb_type_graph.cpp +++ b/vpr/src/pack/pb_type_graph.cpp @@ -13,7 +13,6 @@ #include #include -#include #include #include "vtr_util.h" @@ -23,7 +22,6 @@ #include "vtr_token.h" #include "vpr_error.h" -#include "vpr_types.h" #include "physical_types.h" #include "globals.h" @@ -31,8 +29,6 @@ #include "pb_type_graph.h" #include "pb_type_graph_annotations.h" #include "cluster_feasibility_filter.h" -#include "power.h" -#include "read_xml_arch_file.h" /* variable global to this section that indexes each pb graph pin within a cluster */ static vtr::t_linked_vptr* edges_head; diff --git a/vpr/src/pack/pb_type_graph.h b/vpr/src/pack/pb_type_graph.h index f2d8cdeb5d9..cda5bdf1696 100644 --- a/vpr/src/pack/pb_type_graph.h +++ b/vpr/src/pack/pb_type_graph.h @@ -1,6 +1,8 @@ #ifndef PB_TYPE_GRAPH_H #define PB_TYPE_GRAPH_H +#include "physical_types.h" + struct t_pb_graph_edge_comparator { int input_pin_id_in_cluster; int output_pin_id_in_cluster; diff --git a/vpr/src/pack/pb_type_graph_annotations.cpp b/vpr/src/pack/pb_type_graph_annotations.cpp index a01fec982b5..e0988af7143 100644 --- a/vpr/src/pack/pb_type_graph_annotations.cpp +++ b/vpr/src/pack/pb_type_graph_annotations.cpp @@ -2,24 +2,20 @@ * April 15, 2011 * Loads statistical information (min/max delays, power) onto the pb_graph. */ +#include #include #include #include +#include "arch_util.h" #include "vtr_assert.h" #include "vtr_util.h" -#include "vtr_memory.h" #include "vtr_token.h" -#include "vpr_types.h" #include "vpr_error.h" -#include "arch_types.h" -#include "globals.h" -#include "vpr_utils.h" #include "pb_type_graph.h" #include "pb_type_graph_annotations.h" -#include "read_xml_arch_file.h" static void load_pack_pattern_annotations(const int line_num, t_pb_graph_node* pb_graph_node, const int mode, const char* annot_in_pins, const char* annot_out_pins, const char* value); diff --git a/vpr/src/pack/pb_type_graph_annotations.h b/vpr/src/pack/pb_type_graph_annotations.h index 3f93d96fa14..317f63b394c 100644 --- a/vpr/src/pack/pb_type_graph_annotations.h +++ b/vpr/src/pack/pb_type_graph_annotations.h @@ -7,6 +7,8 @@ #ifndef PB_TYPE_GRAPH_ANNOTATIONS_H #define PB_TYPE_GRAPH_ANNOTATIONS_H +class t_pb_graph_node; + void load_pb_graph_pin_to_pin_annotations(t_pb_graph_node* pb_graph_node); #endif diff --git a/vpr/src/pack/sync_netlists_to_routing_flat.h b/vpr/src/pack/sync_netlists_to_routing_flat.h index 0c1bc7d77d3..ef6b743fe30 100644 --- a/vpr/src/pack/sync_netlists_to_routing_flat.h +++ b/vpr/src/pack/sync_netlists_to_routing_flat.h @@ -1,5 +1,3 @@ -#include "netlist.h" - /******************************************************************** * Top-level function to synchronize packing results to routing results. * Flat routing invalidates the ClusteredNetlist since nets may be routed diff --git a/vpr/src/pack/verify_flat_placement.cpp b/vpr/src/pack/verify_flat_placement.cpp index 76a893d66a6..59bb36bbbf8 100644 --- a/vpr/src/pack/verify_flat_placement.cpp +++ b/vpr/src/pack/verify_flat_placement.cpp @@ -4,7 +4,6 @@ #include "atom_netlist.h" #include "atom_netlist_fwd.h" #include "prepack.h" -#include "vpr_types.h" #include "vtr_log.h" unsigned verify_flat_placement_for_packing(const FlatPlacementInfo& flat_placement_info,