diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-05-03 04:54:06 +0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-05-03 04:54:06 +0800 |
commit | 32b07625464c92dcb32e2d5c40134ada0497d717 (patch) | |
tree | 1480934e1a657e21cc87c339acc28fd157e9591b /src/aig/gia/giaDup.c | |
parent | e6b16e27d1cf5e5d5ec21ce01ed4e424624734d3 (diff) | |
download | abc-32b07625464c92dcb32e2d5c40134ada0497d717.tar.gz abc-32b07625464c92dcb32e2d5c40134ada0497d717.tar.bz2 abc-32b07625464c92dcb32e2d5c40134ada0497d717.zip |
Preventing &iso from removing fanoutless PIs.
Diffstat (limited to 'src/aig/gia/giaDup.c')
-rw-r--r-- | src/aig/gia/giaDup.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/aig/gia/giaDup.c b/src/aig/gia/giaDup.c index 2171cb5e..7d11eff9 100644 --- a/src/aig/gia/giaDup.c +++ b/src/aig/gia/giaDup.c @@ -1850,7 +1850,7 @@ void Gia_ManDupCones_rec( Gia_Man_t * p, Gia_Obj_t * pObj, Vec_Ptr_t * vLeaves, Vec_PtrPush( vLeaves, pObj ); else assert( 0 ); } -Gia_Man_t * Gia_ManDupCones( Gia_Man_t * p, int * pPos, int nPos ) +Gia_Man_t * Gia_ManDupCones( Gia_Man_t * p, int * pPos, int nPos, int fTrimPis ) { Gia_Man_t * pNew; Vec_Ptr_t * vLeaves, * vNodes, * vRoots; @@ -1877,8 +1877,16 @@ Gia_Man_t * Gia_ManDupCones( Gia_Man_t * p, int * pPos, int nPos ) // map the constant node Gia_ManConst0(p)->Value = 0; // create PIs - Vec_PtrForEachEntry( Gia_Obj_t *, vLeaves, pObj, i ) - pObj->Value = Gia_ManAppendCi( pNew ); + if ( fTrimPis ) + { + Vec_PtrForEachEntry( Gia_Obj_t *, vLeaves, pObj, i ) + pObj->Value = Gia_ManAppendCi( pNew ); + } + else + { + Gia_ManForEachPi( p, pObj, i ) + pObj->Value = Gia_ManAppendCi( pNew ); + } // create LOs Vec_PtrForEachEntryStart( Gia_Obj_t *, vRoots, pObj, i, nPos ) Gia_ObjRiToRo(p, pObj)->Value = Gia_ManAppendCi( pNew ); |