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