Correct catastrophic memory bloat in Anabatic::layerAssign() step.
* Bug: In Anabatic::_desaturate(), the set of invalidated GCells was never cleared between iterations of desaturated GCells. This was not a memory leak per se because, in the end, the set was freed. But it did induce a gigantic bloating in memory. This finally explain the strange slow down in that stage. Detected in ls180+cmos45. * Change: In Anabatic::GCell, add a flag for each depth to avoid desaturating twice the same GCell (maybe not needed now that the bug is corrected, but it ensure a no-looping).
This commit is contained in:
parent
2cfd9a0c51
commit
66361fcf3d
|
@ -298,6 +298,7 @@ namespace Anabatic {
|
||||||
, _contacts ()
|
, _contacts ()
|
||||||
, _depth (Session::getRoutingGauge()->getDepth())
|
, _depth (Session::getRoutingGauge()->getDepth())
|
||||||
, _pinDepth (0)
|
, _pinDepth (0)
|
||||||
|
, _satProcessed (0)
|
||||||
, _rpCount (0)
|
, _rpCount (0)
|
||||||
, _blockages (new DbU::Unit [_depth])
|
, _blockages (new DbU::Unit [_depth])
|
||||||
, _cDensity (0.0)
|
, _cDensity (0.0)
|
||||||
|
|
|
@ -368,10 +368,13 @@ namespace Anabatic {
|
||||||
|
|
||||||
if (not finished) {
|
if (not finished) {
|
||||||
optimized = gcell->stepNetDesaturate( depth, globalNets, invalidateds );
|
optimized = gcell->stepNetDesaturate( depth, globalNets, invalidateds );
|
||||||
|
gcell->setSatProcessed( depth );
|
||||||
if (optimized) {
|
if (optimized) {
|
||||||
for ( GCell* gcell : invalidateds ) {
|
for ( GCell* gcell : invalidateds ) {
|
||||||
queue.push( gcell->cloneKey(depth) );
|
if (not gcell->isSatProcessed(depth))
|
||||||
|
queue.push( gcell->cloneKey(depth) );
|
||||||
}
|
}
|
||||||
|
invalidateds.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -830,7 +833,7 @@ namespace Anabatic {
|
||||||
cmess1 << " o Balance Global Density "
|
cmess1 << " o Balance Global Density "
|
||||||
<< Session::getRoutingGauge()->getRoutingLayer(depth)->getName() << endl;
|
<< Session::getRoutingGauge()->getRoutingLayer(depth)->getName() << endl;
|
||||||
|
|
||||||
GCellDensitySet queue ( depth, getGCells()) );
|
GCellDensitySet queue ( depth, getGCells() );
|
||||||
GCell::Set invalidateds;
|
GCell::Set invalidateds;
|
||||||
|
|
||||||
bool optimized = true;
|
bool optimized = true;
|
||||||
|
|
|
@ -140,6 +140,7 @@ namespace Anabatic {
|
||||||
public:
|
public:
|
||||||
static GCell* create ( AnabaticEngine* );
|
static GCell* create ( AnabaticEngine* );
|
||||||
public:
|
public:
|
||||||
|
inline bool isSatProcessed ( size_t depth ) const;
|
||||||
inline bool isSaturated () const;
|
inline bool isSaturated () const;
|
||||||
bool isSaturated ( size_t depth ) const;
|
bool isSaturated ( size_t depth ) const;
|
||||||
inline bool isInvalidated () const;
|
inline bool isInvalidated () const;
|
||||||
|
@ -257,6 +258,7 @@ namespace Anabatic {
|
||||||
size_t checkDensity () const;
|
size_t checkDensity () const;
|
||||||
bool checkEdgeSaturation ( size_t hreserved, size_t vreserved) const;
|
bool checkEdgeSaturation ( size_t hreserved, size_t vreserved) const;
|
||||||
void setType ( Flags );
|
void setType ( Flags );
|
||||||
|
inline void setSatProcessed ( size_t depth );
|
||||||
void addBlockage ( size_t depth, DbU::Unit );
|
void addBlockage ( size_t depth, DbU::Unit );
|
||||||
inline void addHSegment ( AutoSegment* );
|
inline void addHSegment ( AutoSegment* );
|
||||||
inline void addVSegment ( AutoSegment* );
|
inline void addVSegment ( AutoSegment* );
|
||||||
|
@ -334,6 +336,7 @@ namespace Anabatic {
|
||||||
vector<AutoContact*> _contacts;
|
vector<AutoContact*> _contacts;
|
||||||
size_t _depth;
|
size_t _depth;
|
||||||
size_t _pinDepth;
|
size_t _pinDepth;
|
||||||
|
uint32_t _satProcessed;
|
||||||
int _rpCount;
|
int _rpCount;
|
||||||
DbU::Unit* _blockages;
|
DbU::Unit* _blockages;
|
||||||
float _cDensity;
|
float _cDensity;
|
||||||
|
@ -486,6 +489,12 @@ namespace Anabatic {
|
||||||
inline void GCell::addContact ( AutoContact* contact )
|
inline void GCell::addContact ( AutoContact* contact )
|
||||||
{ _flags |= Flags::Invalidated; _contacts.push_back(contact); }
|
{ _flags |= Flags::Invalidated; _contacts.push_back(contact); }
|
||||||
|
|
||||||
|
inline bool GCell::isSatProcessed ( size_t depth ) const
|
||||||
|
{ return (_satProcessed & (1 << depth)); }
|
||||||
|
|
||||||
|
inline void GCell::setSatProcessed ( size_t depth )
|
||||||
|
{ _satProcessed |= (1 << depth); }
|
||||||
|
|
||||||
|
|
||||||
inline bool operator< ( const GCell& lhs, const GCell& rhs )
|
inline bool operator< ( const GCell& lhs, const GCell& rhs )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue