Skip to content

Commit d2a1632

Browse files
no need to manually destruct PlacerContext as it is a local object
it will be destructed when going out of scope
1 parent ec507de commit d2a1632

File tree

1 file changed

+3
-29
lines changed

1 file changed

+3
-29
lines changed

vpr/src/place/place.cpp

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,7 @@ static void alloc_and_load_placement_structs(float place_cost_exp,
198198
static void alloc_and_load_try_swap_structs(const bool cube_bb);
199199
static void free_try_swap_structs();
200200

201-
static void free_placement_structs(const t_placer_opts& placer_opts,
202-
const t_noc_opts& noc_opts,
203-
PlacerContext& placer_ctx);
201+
static void free_placement_structs(const t_noc_opts& noc_opts);
204202

205203
static e_move_result try_swap(const t_annealing_state* state,
206204
t_placer_costs* costs,
@@ -979,7 +977,7 @@ void try_place(const Netlist<>& net_list,
979977
write_noc_placement_file(noc_opts.noc_placement_file_name, blk_loc_registry.block_locs());
980978
}
981979

982-
free_placement_structs(placer_opts, noc_opts, placer_ctx);
980+
free_placement_structs(noc_opts);
983981
free_try_swap_arrays();
984982

985983
print_timing_stats("Placement Quench", post_quench_timing_stats,
@@ -1919,35 +1917,11 @@ static void alloc_and_load_placement_structs(float place_cost_exp,
19191917

19201918
/* Frees the major structures needed by the placer (and not needed *
19211919
* elsewhere). */
1922-
static void free_placement_structs(const t_placer_opts& placer_opts,
1923-
const t_noc_opts& noc_opts,
1924-
PlacerContext& placer_ctx) {
1925-
auto& place_move_ctx = placer_ctx.mutable_move();
1926-
1927-
if (placer_opts.place_algorithm.is_timing_driven()) {
1928-
auto& p_timing_ctx = placer_ctx.mutable_timing();
1929-
1930-
vtr::release_memory(p_timing_ctx.connection_timing_cost);
1931-
vtr::release_memory(p_timing_ctx.connection_delay);
1932-
vtr::release_memory(p_timing_ctx.connection_setup_slack);
1933-
vtr::release_memory(p_timing_ctx.proposed_connection_timing_cost);
1934-
vtr::release_memory(p_timing_ctx.proposed_connection_delay);
1935-
vtr::release_memory(p_timing_ctx.net_timing_cost);
1936-
}
1937-
1920+
static void free_placement_structs(const t_noc_opts& noc_opts) {
19381921
free_placement_macros_structs();
19391922

19401923
free_place_move_structs();
19411924

1942-
vtr::release_memory(place_move_ctx.bb_coords);
1943-
vtr::release_memory(place_move_ctx.bb_num_on_edges);
1944-
vtr::release_memory(place_move_ctx.bb_coords);
1945-
1946-
vtr::release_memory(place_move_ctx.layer_bb_num_on_edges);
1947-
vtr::release_memory(place_move_ctx.layer_bb_coords);
1948-
1949-
place_move_ctx.num_sink_pin_layer.clear();
1950-
19511925
free_chan_w_factors_for_place_cost();
19521926

19531927
free_try_swap_structs();

0 commit comments

Comments
 (0)