Skip to content

Commit 7539c73

Browse files
committed
Sta::vertexSlack(endpoint) speedup
Signed-off-by: James Cherry <[email protected]>
1 parent 8f8f397 commit 7539c73

File tree

2 files changed

+25
-18
lines changed

2 files changed

+25
-18
lines changed

search/Search.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,8 @@ Search::findArrivals1(Level level)
10741074
Stats stats(debug_, report_);
10751075
int arrival_count = arrival_iter_->visitParallel(level, arrival_visitor_);
10761076
deleteTagsPrev();
1077-
deleteUnusedTagGroups();
1077+
if (arrival_count > 0)
1078+
deleteUnusedTagGroups();
10781079
stats.report("Find arrivals");
10791080
if (arrival_iter_->empty()
10801081
&& invalid_arrivals_->empty()) {

search/Sta.cc

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3196,24 +3196,30 @@ Sta::findRequired(Vertex *vertex)
31963196
{
31973197
searchPreamble();
31983198
search_->findAllArrivals();
3199-
search_->findRequireds(vertex->level());
3200-
if (variables_->crprEnabled()
3201-
&& search_->crprPathPruningEnabled()
3202-
&& !search_->crprApproxMissingRequireds()
3203-
// Clocks invariably have requireds that are pruned but it isn't
3204-
// worth finding arrivals and requireds all over again for
3205-
// the entire fanout of the clock.
3206-
&& !search_->isClock(vertex)) {
3207-
// Invalidate arrivals and requireds and disable
3208-
// path pruning on fanout vertices with DFS.
3209-
int fanout = 0;
3210-
disableFanoutCrprPruning(vertex, fanout);
3211-
debugPrint(debug_, "search", 1, "resurrect pruned required %s fanout %d",
3212-
vertex->to_string(this).c_str(),
3213-
fanout);
3214-
// Find fanout arrivals and requireds with pruning disabled.
3215-
search_->findArrivals();
3199+
if (search_->isEndpoint(vertex)
3200+
// Need to include downstream required times if there is fanout.
3201+
&& !hasFanout(vertex, search_->searchAdj(), graph_))
3202+
search_->seedRequired(vertex);
3203+
else {
32163204
search_->findRequireds(vertex->level());
3205+
if (variables_->crprEnabled()
3206+
&& search_->crprPathPruningEnabled()
3207+
&& !search_->crprApproxMissingRequireds()
3208+
// Clocks invariably have requireds that are pruned but it isn't
3209+
// worth finding arrivals and requireds all over again for
3210+
// the entire fanout of the clock.
3211+
&& !search_->isClock(vertex)) {
3212+
// Invalidate arrivals and requireds and disable
3213+
// path pruning on fanout vertices with DFS.
3214+
int fanout = 0;
3215+
disableFanoutCrprPruning(vertex, fanout);
3216+
debugPrint(debug_, "search", 1, "resurrect pruned required %s fanout %d",
3217+
vertex->to_string(this).c_str(),
3218+
fanout);
3219+
// Find fanout arrivals and requireds with pruning disabled.
3220+
search_->findArrivals();
3221+
search_->findRequireds(vertex->level());
3222+
}
32173223
}
32183224
}
32193225

0 commit comments

Comments
 (0)