diff options
Diffstat (limited to 'src/aig/ntl/ntlFraig.c')
-rw-r--r-- | src/aig/ntl/ntlFraig.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/aig/ntl/ntlFraig.c b/src/aig/ntl/ntlFraig.c index bd39956e..38568d26 100644 --- a/src/aig/ntl/ntlFraig.c +++ b/src/aig/ntl/ntlFraig.c @@ -145,13 +145,20 @@ void Ntl_ManReduce( Ntl_Man_t * p, Aig_Man_t * pAig ) continue; assert( pObj != pObjRepr ); pNet = pObj->pData; - // do not reduce the net if it is driven by a multi-output box - if ( Ntl_ObjIsBox(pNet->pDriver) && Ntl_ObjFanoutNum(pNet->pDriver) > 1 ) - continue; - // do not reduce the net if it has no-merge attribute - if ( Ntl_ObjIsBox(pNet->pDriver) && pNet->pDriver->pImplem->attrNoMerge ) - continue; pNetRepr = pObjRepr->pData; + // consider special cases, when the net should not be reduced + if ( Ntl_ObjIsBox(pNet->pDriver) ) + { + // do not reduce the net if it is driven by a multi-output box + if ( Ntl_ObjFanoutNum(pNet->pDriver) > 1 ) + continue; + // do not reduce the net if it has no-merge attribute + if ( pNet->pDriver->pImplem->attrNoMerge ) + continue; + // do not reduce the net if the replacement net has no-merge attribute + if ( pNetRepr != NULL && pNetRepr->pDriver->pImplem->attrNoMerge ) + continue; + } if ( pNetRepr == NULL ) { // this is the constant node |