Performance bug fix in choice generation.

This commit is contained in:
Alan Mishchenko
2012-11-09 12:43:03 -08:00
parent aa2c7c0546
commit fdcbb2cf37
7 changed files with 51 additions and 27 deletions
+14 -1
View File
@@ -392,7 +392,20 @@ Vec_Ptr_t * Aig_ManDfsChoices( Aig_Man_t * p )
{
Vec_Ptr_t * vNodes;
Aig_Obj_t * pObj;
int i;
int i, Counter = 0;
Aig_ManForEachNode( p, pObj, i )
{
if ( Aig_ObjEquiv(p, pObj) == NULL )
continue;
Counter = 0;
for ( pObj = Aig_ObjEquiv(p, pObj) ; pObj; pObj = Aig_ObjEquiv(p, pObj) )
Counter++;
printf( "%d ", Counter );
}
printf( "\n" );
assert( p->pEquivs != NULL );
Aig_ManIncrementTravId( p );
// mark constant and PIs
+1
View File
@@ -299,6 +299,7 @@ If_Man_t * Gia_ManToIf( Gia_Man_t * p, If_Par_t * pPars )
for ( pPrev = pObj, pSibl = Gia_ObjSiblObj(p, i); pSibl; pPrev = pSibl, pSibl = Gia_ObjSiblObj(p, Gia_ObjId(p, pSibl)) )
If_ObjSetChoice( If_ManObj(pIfMan, Gia_ObjValue(pObj)), If_ManObj(pIfMan, Gia_ObjValue(pSibl)) );
If_ManCreateChoice( pIfMan, If_ManObj(pIfMan, Gia_ObjValue(pObj)) );
pPars->fExpRed = 0;
}
// assert( If_ObjLevel(pIfObj) == Gia_ObjLevel(pNode) );
}