Skip to content

Commit

Permalink
Merge branch 'parallaxsw:master' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
akashlevy authored Nov 7, 2024
2 parents 89de886 + 23eccdd commit 5ef5ce0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 24 deletions.
27 changes: 15 additions & 12 deletions graph/Graph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -633,13 +633,6 @@ Graph::deleteRequireds(Vertex *vertex,
vertex->setRequireds(arrival_null);
}

void
Graph::clearArrivals()
{
arrivals_.clear();
requireds_.clear();
}

PathVertexRep *
Graph::makePrevPaths(Vertex *vertex,
uint32_t count)
Expand Down Expand Up @@ -674,19 +667,32 @@ Graph::deletePrevPaths(Vertex *vertex,
}

void
Graph::clearPrevPaths()
Graph::deletePaths()
{
arrivals_.clear();
requireds_.clear();
prev_paths_.clear();
VertexIterator vertex_iter(graph_);
while (vertex_iter.hasNext()) {
Vertex *vertex = vertex_iter.next();
vertex->setArrivals(arrival_null);
vertex->setRequireds(arrival_null);
vertex->setPrevPaths(object_id_null);
vertex->tag_group_index_ = tag_group_index_max;
vertex->crpr_path_pruning_disabled_ = false;
}
}

// No locks.
void
Graph::deletePaths(Vertex *vertex,
uint32_t count)
{
if (vertex->arrivals() != arrival_null) {
LockGuard lock(arrivals_lock_);
arrivals_.destroy(vertex->arrivals(), count);
vertex->setArrivals(arrival_null);
vertex->tag_group_index_ = tag_group_index_max;
vertex->crpr_path_pruning_disabled_ = false;
}
if (vertex->requireds() != arrival_null) {
requireds_.destroy(vertex->requireds(), count);
Expand All @@ -697,9 +703,6 @@ Graph::deletePaths(Vertex *vertex,
prev_paths_.destroy(vertex->prevPaths(), count);
vertex->setPrevPaths(object_id_null);
}

vertex->tag_group_index_ = tag_group_index_max;
vertex->crpr_path_pruning_disabled_ = false;
}

////////////////////////////////////////////////////////////////
Expand Down
6 changes: 3 additions & 3 deletions include/sta/Graph.hh
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,16 @@ public:
Required *requireds(Vertex *vertex);
void deleteRequireds(Vertex *vertex,
uint32_t count);
void clearArrivals();
size_t arrivalCount() const { return arrivals_.size(); }
size_t requiredCount() const { return requireds_.size(); }
PathVertexRep *makePrevPaths(Vertex *vertex,
uint32_t count);
PathVertexRep *prevPaths(Vertex *vertex) const;
void deletePrevPaths(Vertex *vertex,
uint32_t count);
void clearPrevPaths();
// Private to Search::deletePaths1(Vertex).
// Private to Search::deletePaths().
void deletePaths();
// Private to Search::deletePaths(Vertex).
void deletePaths(Vertex *vertex,
uint32_t count);

Expand Down
2 changes: 0 additions & 2 deletions liberty/LibertyReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,6 @@ LibertyReader::beginLibrary(LibertyGroup *group)
library_->units()->currentUnit()->setScale(current_scale_);
library_->units()->distanceUnit()->setScale(distance_scale_);


library_->setDelayModelType(DelayModelType::cmos_linear);
scale_factors_ = new ScaleFactors("");
library_->setScaleFactors(scale_factors_);
}
Expand Down
8 changes: 1 addition & 7 deletions search/Search.cc
Original file line number Diff line number Diff line change
Expand Up @@ -400,14 +400,8 @@ Search::deletePaths()
{
debugPrint(debug_, "search", 1, "delete paths");
if (arrivals_exist_) {
VertexIterator vertex_iter(graph_);
while (vertex_iter.hasNext()) {
Vertex *vertex = vertex_iter.next();
deletePaths(vertex);
}
graph_->deletePaths();
filtered_arrivals_->clear();
graph_->clearArrivals();
graph_->clearPrevPaths();
arrivals_exist_ = false;
}
}
Expand Down
1 change: 1 addition & 0 deletions util/StringUtil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ stringPrintTmp(const char *fmt,

if (tmp_length >= tmp_length1) {
tmp_length1 = tmp_length + 1;
stringDelete(tmp);
tmp = makeTmpString(tmp_length1);
va_copy(args_copy, args);
tmp_length = vsnprint(tmp, tmp_length1, fmt, args_copy);
Expand Down

0 comments on commit 5ef5ce0

Please sign in to comment.