Sta::vertexSlack(endpoint) speedup

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2025-10-23 08:56:22 -07:00
parent 8f8f397610
commit 7539c7372d
2 changed files with 25 additions and 18 deletions

View File

@ -1074,7 +1074,8 @@ Search::findArrivals1(Level level)
Stats stats(debug_, report_);
int arrival_count = arrival_iter_->visitParallel(level, arrival_visitor_);
deleteTagsPrev();
deleteUnusedTagGroups();
if (arrival_count > 0)
deleteUnusedTagGroups();
stats.report("Find arrivals");
if (arrival_iter_->empty()
&& invalid_arrivals_->empty()) {

View File

@ -3196,24 +3196,30 @@ Sta::findRequired(Vertex *vertex)
{
searchPreamble();
search_->findAllArrivals();
search_->findRequireds(vertex->level());
if (variables_->crprEnabled()
&& search_->crprPathPruningEnabled()
&& !search_->crprApproxMissingRequireds()
// Clocks invariably have requireds that are pruned but it isn't
// worth finding arrivals and requireds all over again for
// the entire fanout of the clock.
&& !search_->isClock(vertex)) {
// Invalidate arrivals and requireds and disable
// path pruning on fanout vertices with DFS.
int fanout = 0;
disableFanoutCrprPruning(vertex, fanout);
debugPrint(debug_, "search", 1, "resurrect pruned required %s fanout %d",
vertex->to_string(this).c_str(),
fanout);
// Find fanout arrivals and requireds with pruning disabled.
search_->findArrivals();
if (search_->isEndpoint(vertex)
// Need to include downstream required times if there is fanout.
&& !hasFanout(vertex, search_->searchAdj(), graph_))
search_->seedRequired(vertex);
else {
search_->findRequireds(vertex->level());
if (variables_->crprEnabled()
&& search_->crprPathPruningEnabled()
&& !search_->crprApproxMissingRequireds()
// Clocks invariably have requireds that are pruned but it isn't
// worth finding arrivals and requireds all over again for
// the entire fanout of the clock.
&& !search_->isClock(vertex)) {
// Invalidate arrivals and requireds and disable
// path pruning on fanout vertices with DFS.
int fanout = 0;
disableFanoutCrprPruning(vertex, fanout);
debugPrint(debug_, "search", 1, "resurrect pruned required %s fanout %d",
vertex->to_string(this).c_str(),
fanout);
// Find fanout arrivals and requireds with pruning disabled.
search_->findArrivals();
search_->findRequireds(vertex->level());
}
}
}