diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-09-05 02:15:36 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-09-05 02:15:36 -0700 |
commit | eddb194ce0b2a1a505cbf445a56dcaa27abdc270 (patch) | |
tree | 783e43633048a6f0f8c1bf4cf633c987c14d8ab7 /src/aig | |
parent | e5ae3f28f7311286de65060601a51c600da993df (diff) | |
download | abc-eddb194ce0b2a1a505cbf445a56dcaa27abdc270.tar.gz abc-eddb194ce0b2a1a505cbf445a56dcaa27abdc270.tar.bz2 abc-eddb194ce0b2a1a505cbf445a56dcaa27abdc270.zip |
Making selecting duplication procedure creates a smaller AIG.
Diffstat (limited to 'src/aig')
-rw-r--r-- | src/aig/gia/giaDup.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/aig/gia/giaDup.c b/src/aig/gia/giaDup.c index 85af8748..2e911ba8 100644 --- a/src/aig/gia/giaDup.c +++ b/src/aig/gia/giaDup.c @@ -906,8 +906,11 @@ Gia_Man_t * Gia_ManDupMarked( Gia_Man_t * p ) Gia_Man_t * pNew; Gia_Obj_t * pObj; int i, nRos = 0, nRis = 0; + int CountMarked = 0; + Gia_ManForEachObj1( p, pObj, i ) + CountMarked += pObj->fMark0; Gia_ManFillValue( p ); - pNew = Gia_ManStart( Gia_ManObjNum(p) ); + pNew = Gia_ManStart( Gia_ManObjNum(p) - CountMarked ); if ( p->pMuxes ) pNew->pMuxes = ABC_CALLOC( unsigned, pNew->nObjsAlloc ); pNew->nConstrs = p->nConstrs; @@ -917,8 +920,10 @@ Gia_Man_t * Gia_ManDupMarked( Gia_Man_t * p ) Gia_ManForEachObj1( p, pObj, i ) { if ( pObj->fMark0 ) + { + pObj->fMark0 = 0; continue; - pObj->fMark0 = 0; + } if ( Gia_ObjIsAnd(pObj) ) { if ( Gia_ObjIsXor(pObj) ) |