mirror of https://github.com/YosysHQ/abc.git
Added counting hits and misses during structural hashing.
This commit is contained in:
parent
edbff75fff
commit
4bd7efa6cd
|
|
@ -149,6 +149,8 @@ struct Gia_Man_t_
|
|||
Vec_Flt_t * vTiming; // arrival/required/slack
|
||||
void * pManTime; // the timing manager
|
||||
void * pLutLib; // LUT library
|
||||
word nHashHit; // hash table hit
|
||||
word nHashMiss; // hash table miss
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -490,8 +490,12 @@ int Gia_ManHashAnd( Gia_Man_t * p, int iLit0, int iLit1 )
|
|||
iLit0 ^= iLit1, iLit1 ^= iLit0, iLit0 ^= iLit1;
|
||||
{
|
||||
int * pPlace = Gia_ManHashFind( p, iLit0, iLit1 );
|
||||
if ( *pPlace )
|
||||
if ( *pPlace )
|
||||
{
|
||||
p->nHashHit++;
|
||||
return *pPlace;
|
||||
}
|
||||
p->nHashMiss++;
|
||||
if ( p->nObjs < p->nObjsAlloc )
|
||||
return *pPlace = Gia_ManAppendAnd( p, iLit0, iLit1 );
|
||||
else
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ Gia_Man_t * Gia_ManStart( int nObjsMax )
|
|||
***********************************************************************/
|
||||
void Gia_ManStop( Gia_Man_t * p )
|
||||
{
|
||||
printf( "Hash table hits = %12u. Hash table misses = %12u.\n", (int)p->nHashHit, (int)p->nHashMiss );
|
||||
Tim_ManStopP( (Tim_Man_t **)&p->pManTime );
|
||||
assert( p->pManTime == NULL );
|
||||
Vec_PtrFreeFree( p->vNamesIn );
|
||||
|
|
|
|||
|
|
@ -369,7 +369,8 @@ int Au_NtkAllocObj( Au_Ntk_t * p, int nFanins, int Type )
|
|||
{
|
||||
int nObjInt2 = 63 + 64 * (((nObjInt-63) >> 6) + (((nObjInt-63) & 63) > 0));
|
||||
assert( nObjInt2 >= nObjInt );
|
||||
p->nUseful += nObjInt - nObjInt2;
|
||||
// if ( nObjInt2 + 64 < (1 << 12) )
|
||||
// p->nUseful += nObjInt - nObjInt2;
|
||||
nObjInt = nObjInt2;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue