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 ()
|
||||
, _depth (Session::getRoutingGauge()->getDepth())
|
||||
, _pinDepth (0)
|
||||
, _satProcessed (0)
|
||||
, _rpCount (0)
|
||||
, _blockages (new DbU::Unit [_depth])
|
||||
, _cDensity (0.0)
|
||||
|
|
|
@ -368,10 +368,13 @@ namespace Anabatic {
|
|||
|
||||
if (not finished) {
|
||||
optimized = gcell->stepNetDesaturate( depth, globalNets, invalidateds );
|
||||
gcell->setSatProcessed( depth );
|
||||
if (optimized) {
|
||||
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 "
|
||||
<< Session::getRoutingGauge()->getRoutingLayer(depth)->getName() << endl;
|
||||
|
||||
GCellDensitySet queue ( depth, getGCells()) );
|
||||
GCellDensitySet queue ( depth, getGCells() );
|
||||
GCell::Set invalidateds;
|
||||
|
||||
bool optimized = true;
|
||||
|
|
|
@ -140,6 +140,7 @@ namespace Anabatic {
|
|||
public:
|
||||
static GCell* create ( AnabaticEngine* );
|
||||
public:
|
||||
inline bool isSatProcessed ( size_t depth ) const;
|
||||
inline bool isSaturated () const;
|
||||
bool isSaturated ( size_t depth ) const;
|
||||
inline bool isInvalidated () const;
|
||||
|
@ -257,6 +258,7 @@ namespace Anabatic {
|
|||
size_t checkDensity () const;
|
||||
bool checkEdgeSaturation ( size_t hreserved, size_t vreserved) const;
|
||||
void setType ( Flags );
|
||||
inline void setSatProcessed ( size_t depth );
|
||||
void addBlockage ( size_t depth, DbU::Unit );
|
||||
inline void addHSegment ( AutoSegment* );
|
||||
inline void addVSegment ( AutoSegment* );
|
||||
|
@ -334,6 +336,7 @@ namespace Anabatic {
|
|||
vector<AutoContact*> _contacts;
|
||||
size_t _depth;
|
||||
size_t _pinDepth;
|
||||
uint32_t _satProcessed;
|
||||
int _rpCount;
|
||||
DbU::Unit* _blockages;
|
||||
float _cDensity;
|
||||
|
@ -486,6 +489,12 @@ namespace Anabatic {
|
|||
inline void GCell::addContact ( AutoContact* 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 )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue