From 7e12a99f9b59d599a3da9810161c7413650cc8d4 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Mon, 20 Apr 2020 10:07:14 -0700 Subject: [PATCH] Vertex::deletePaths() --- graph/Graph.cc | 10 ++++++++++ include/sta/Graph.hh | 4 +++- include/sta/Search.hh | 1 - search/Search.cc | 16 +++------------- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/graph/Graph.cc b/graph/Graph.cc index 512750f4..ca22c934 100644 --- a/graph/Graph.cc +++ b/graph/Graph.cc @@ -1174,6 +1174,16 @@ Vertex::setHasRequireds(bool has_req) has_requireds_ = has_req; } +void +Vertex::deletePaths() +{ + arrivals_ = arrival_null; + prev_paths_ = prev_path_null; + tag_group_index_ = tag_group_index_max; + has_requireds_ = false; + crpr_path_pruning_disabled_ = false; +} + LogicValue Vertex::simValue() const { diff --git a/include/sta/Graph.hh b/include/sta/Graph.hh index 3d989bdb..f31da812 100644 --- a/include/sta/Graph.hh +++ b/include/sta/Graph.hh @@ -275,7 +275,6 @@ public: LevelColor color() const { return static_cast(color_); } void setColor(LevelColor color); ArrivalId arrivals() { return arrivals_; } - void setArrivals(ArrivalId id); PrevPathId prevPaths() const { return prev_paths_; } void setPrevPaths(PrevPathId id); // Requireds optionally follow arrivals in the same array. @@ -325,6 +324,8 @@ public: // ObjectTable interface. ObjectIdx objectIdx() const { return object_idx_; } void setObjectIdx(ObjectIdx idx); + // private to Search.cc + void deletePaths(); static int transitionCount() { return 2; } // rise/fall @@ -332,6 +333,7 @@ protected: void init(Pin *pin, bool is_bidirect_drvr, bool is_reg_clk); + void setArrivals(ArrivalId id); Pin *pin_; ArrivalId arrivals_; diff --git a/include/sta/Search.hh b/include/sta/Search.hh index ee750485..09929e3c 100644 --- a/include/sta/Search.hh +++ b/include/sta/Search.hh @@ -482,7 +482,6 @@ protected: const PathAnalysisPt *path_ap); void deletePaths(); void deletePaths(Vertex *vertex); - void deletePaths1(Vertex *vertex); TagGroup *findTagGroup(TagGroupBldr *group_bldr); void deleteFilterTags(); void deleteFilterTagGroups(); diff --git a/search/Search.cc b/search/Search.cc index cb4603a4..9c468452 100644 --- a/search/Search.cc +++ b/search/Search.cc @@ -397,7 +397,7 @@ Search::deletePaths() VertexIterator vertex_iter(graph_); while (vertex_iter.hasNext()) { Vertex *vertex = vertex_iter.next(); - deletePaths1(vertex); + vertex->deletePaths(); } graph_->clearArrivals(); graph_->clearPrevPaths(); @@ -405,23 +405,13 @@ Search::deletePaths() } } -void -Search::deletePaths1(Vertex *vertex) -{ - vertex->setArrivals(arrival_null); - vertex->setPrevPaths(prev_path_null); - vertex->setTagGroupIndex(tag_group_index_max); - vertex->setHasRequireds(false); - vertex->setCrprPathPruningDisabled(false); -} - void Search::deletePaths(Vertex *vertex) { tnsNotifyBefore(vertex); if (worst_slacks_) worst_slacks_->worstSlackNotifyBefore(vertex); - deletePaths1(vertex); + vertex->deletePaths(); } //////////////////////////////////////////////////////////////// @@ -720,7 +710,7 @@ void Search::arrivalInvalidDelete(Vertex *vertex) { arrivalInvalid(vertex); - deletePaths1(vertex); + vertex->deletePaths(); } void