Skip to content

Commit 34c7571

Browse files
committed
[vpr][place] don't continue if there is no compatible block in the given range
1 parent 2e4dc59 commit 34c7571

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

vpr/src/place/move_utils.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,15 +1040,16 @@ bool find_compatible_compressed_loc_in_range(t_logical_block_type_ptr type,
10401040
//The candidates are stored in a flat_map so we can efficiently find the set of valid
10411041
//candidates with upper/lower bound.
10421042
const auto& block_rows = compressed_block_grid.get_column_block_map(to_loc.x, to_layer_num);
1043+
auto y_lower_iter = block_rows.lower_bound(search_range.ymin);
1044+
if (y_lower_iter == block_rows.end()) {
1045+
continue;
1046+
}
10431047
if (!fixed_search_range) {
10441048
adjust_y_axis_search_range(search_range, block_rows);
10451049
}
10461050

1047-
auto y_lower_iter = block_rows.lower_bound(search_range.ymin);
1051+
y_lower_iter = block_rows.lower_bound(search_range.ymin);
10481052
auto y_upper_iter = block_rows.upper_bound(search_range.ymax);
1049-
if (y_lower_iter == block_rows.end()) {
1050-
continue;
1051-
}
10521053
int y_range = std::distance(y_lower_iter, y_upper_iter);
10531054
VTR_ASSERT(y_range >= 0);
10541055

0 commit comments

Comments
 (0)