deleteRequireds count arg
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
66a9e25979
commit
b06e72d61f
|
|
@ -17,9 +17,8 @@
|
|||
#include "Graph.hh"
|
||||
|
||||
#include "DisallowCopyAssign.hh"
|
||||
#include "Stats.hh"
|
||||
#include "Error.hh"
|
||||
#include "Debug.hh"
|
||||
#include "Stats.hh"
|
||||
#include "MinMax.hh"
|
||||
#include "Mutex.hh"
|
||||
#include "Transition.hh"
|
||||
|
|
@ -500,10 +499,14 @@ Graph::deleteOutEdge(Vertex *vertex,
|
|||
Graph::edge(next)->vertex_out_prev_ = prev;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
Arrival *
|
||||
Graph::makeArrivals(Vertex *vertex,
|
||||
uint32_t count)
|
||||
{
|
||||
if (vertex->arrivals() != arrival_null)
|
||||
debugPrint(debug_, "leaks", 617, "arrival leak");
|
||||
Arrival *arrivals;
|
||||
ArrivalId id;
|
||||
{
|
||||
|
|
@ -520,10 +523,20 @@ Graph::arrivals(Vertex *vertex)
|
|||
return arrivals_.pointer(vertex->arrivals());
|
||||
}
|
||||
|
||||
void
|
||||
Graph::deleteArrivals(Vertex *vertex,
|
||||
uint32_t count)
|
||||
{
|
||||
arrivals_.deleteArray(count);
|
||||
vertex->setArrivals(arrival_null);
|
||||
}
|
||||
|
||||
Required *
|
||||
Graph::makeRequireds(Vertex *vertex,
|
||||
uint32_t count)
|
||||
{
|
||||
if (vertex->requireds() != arrival_null)
|
||||
debugPrint(debug_, "leaks", 617, "required leak");
|
||||
Required *requireds;
|
||||
ArrivalId id;
|
||||
{
|
||||
|
|
@ -540,6 +553,14 @@ Graph::requireds(Vertex *vertex)
|
|||
return arrivals_.pointer(vertex->requireds());
|
||||
}
|
||||
|
||||
void
|
||||
Graph::deleteRequireds(Vertex *vertex,
|
||||
uint32_t count)
|
||||
{
|
||||
arrivals_.deleteArray(count);
|
||||
vertex->setRequireds(arrival_null);
|
||||
}
|
||||
|
||||
void
|
||||
Graph::clearArrivals()
|
||||
{
|
||||
|
|
@ -572,6 +593,8 @@ Graph::clearPrevPaths()
|
|||
prev_paths_.clear();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
const Slew &
|
||||
Graph::slew(const Vertex *vertex,
|
||||
const RiseFall *rf,
|
||||
|
|
@ -1183,12 +1206,6 @@ Vertex::setRequireds(ArrivalId id)
|
|||
requireds_ = id;
|
||||
}
|
||||
|
||||
void
|
||||
Vertex::deleteRequireds()
|
||||
{
|
||||
requireds_ = arrival_null;
|
||||
}
|
||||
|
||||
void
|
||||
Vertex::setPrevPaths(PrevPathId prev_paths)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ public:
|
|||
void make(uint32_t count,
|
||||
TYPE *&array,
|
||||
ObjectId &id);
|
||||
void deleteArray(uint32_t count);
|
||||
// Grow as necessary and return pointer for id.
|
||||
TYPE *ensureId(ObjectId id);
|
||||
TYPE *pointer(ObjectId id) const;
|
||||
|
|
@ -144,6 +145,12 @@ ArrayTable<TYPE>::pushBlock(ArrayBlock<TYPE> *block)
|
|||
}
|
||||
}
|
||||
|
||||
template <class TYPE>
|
||||
void
|
||||
ArrayTable<TYPE>::deleteArray(uint32_t)
|
||||
{
|
||||
}
|
||||
|
||||
template <class TYPE>
|
||||
TYPE *
|
||||
ArrayTable<TYPE>::pointer(ObjectId id) const
|
||||
|
|
|
|||
|
|
@ -101,9 +101,13 @@ public:
|
|||
Arrival *makeArrivals(Vertex *vertex,
|
||||
uint32_t count);
|
||||
Arrival *arrivals(Vertex *vertex);
|
||||
void deleteArrivals(Vertex *vertex,
|
||||
uint32_t count);
|
||||
Required *makeRequireds(Vertex *vertex,
|
||||
uint32_t count);
|
||||
Required *requireds(Vertex *vertex);
|
||||
void deleteRequireds(Vertex *vertex,
|
||||
uint32_t count);
|
||||
void clearArrivals();
|
||||
size_t arrivalCount() const { return arrivals_.size(); }
|
||||
PathVertexRep *makePrevPaths(Vertex *vertex,
|
||||
|
|
@ -284,7 +288,6 @@ public:
|
|||
ArrivalId arrivals() { return arrivals_; }
|
||||
ArrivalId requireds() { return requireds_; }
|
||||
bool hasRequireds() const { return requireds_ != arrival_null; }
|
||||
void deleteRequireds();
|
||||
PrevPathId prevPaths() const { return prev_paths_; }
|
||||
void setPrevPaths(PrevPathId id);
|
||||
TagGroupIndex tagGroupIndex() const;
|
||||
|
|
|
|||
|
|
@ -84,8 +84,6 @@ public:
|
|||
// Return values.
|
||||
PathVertex &prev_path,
|
||||
TimingArc *&prev_arc) const;
|
||||
static void deleteRequireds(Vertex *vertex,
|
||||
const StaState *sta);
|
||||
static bool equal(const PathVertex *path1,
|
||||
const PathVertex *path2);
|
||||
|
||||
|
|
|
|||
|
|
@ -268,13 +268,6 @@ PathVertex::setRequired(const Required &required,
|
|||
requireds[arrival_index_] = required;
|
||||
}
|
||||
|
||||
void
|
||||
PathVertex::deleteRequireds(Vertex *vertex,
|
||||
const StaState *)
|
||||
{
|
||||
vertex->deleteRequireds();
|
||||
}
|
||||
|
||||
bool
|
||||
PathVertex::equal(const PathVertex *path1,
|
||||
const PathVertex *path2)
|
||||
|
|
|
|||
|
|
@ -2702,10 +2702,18 @@ Search::setVertexArrivals(Vertex *vertex,
|
|||
requiredInvalid(vertex);
|
||||
if (tag_group != prev_tag_group)
|
||||
// Requireds can only be reused if the tag group is unchanged.
|
||||
vertex->deleteRequireds();
|
||||
graph_->deleteRequireds(vertex, prev_tag_group->arrivalCount());
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (prev_tag_group) {
|
||||
uint32_t prev_arrival_count = prev_tag_group->arrivalCount();
|
||||
graph_->deleteArrivals(vertex, prev_arrival_count);
|
||||
if (has_requireds) {
|
||||
requiredInvalid(vertex);
|
||||
graph_->deleteRequireds(vertex, prev_arrival_count);
|
||||
}
|
||||
}
|
||||
Arrival *arrivals = graph_->makeArrivals(vertex, arrival_count);
|
||||
prev_paths = nullptr;
|
||||
if (tag_bldr->hasClkTag() || tag_bldr->hasGenClkSrcTag())
|
||||
|
|
@ -2713,11 +2721,6 @@ Search::setVertexArrivals(Vertex *vertex,
|
|||
tag_bldr->copyArrivals(tag_group, arrivals, prev_paths);
|
||||
|
||||
vertex->setTagGroupIndex(tag_group->index());
|
||||
|
||||
if (has_requireds) {
|
||||
requiredInvalid(vertex);
|
||||
vertex->deleteRequireds();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3363,7 +3366,11 @@ RequiredCmp::requiredsSave(Vertex *vertex,
|
|||
}
|
||||
}
|
||||
else if (prev_reqs) {
|
||||
PathVertex::deleteRequireds(vertex, sta);
|
||||
Graph *graph = sta->graph();
|
||||
const Search *search = sta->search();
|
||||
TagGroup *tag_group = search->tagGroup(vertex);
|
||||
int arrival_count = tag_group->arrivalCount();
|
||||
graph->deleteRequireds(vertex, arrival_count);
|
||||
requireds_changed = true;
|
||||
}
|
||||
return requireds_changed;
|
||||
|
|
|
|||
Loading…
Reference in New Issue