diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-09-19 14:06:51 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-09-19 14:06:51 -0700 |
commit | b05ee94311ac284de1a658f0c72c8c02a433ed4c (patch) | |
tree | a945ce875188e53fc5c6946a6506178eaef663ee /src/map/if/ifMap.c | |
parent | ee727912938fdba38f08570e4ab961c0fd503dcf (diff) | |
download | abc-b05ee94311ac284de1a658f0c72c8c02a433ed4c.tar.gz abc-b05ee94311ac284de1a658f0c72c8c02a433ed4c.tar.bz2 abc-b05ee94311ac284de1a658f0c72c8c02a433ed4c.zip |
Improvements to Boolean matching.
Diffstat (limited to 'src/map/if/ifMap.c')
-rw-r--r-- | src/map/if/ifMap.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c index 18b1eed2..ae8897e2 100644 --- a/src/map/if/ifMap.c +++ b/src/map/if/ifMap.c @@ -270,6 +270,25 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep p->nCutsCountAll++; p->nCutsCount[pCut->nLeaves]++; } + else if ( p->pPars->fUseCofVars ) + { + extern int Abc_TtCheckCondDepTest( word * pTruth, int nVars, int nSuppLim ); + int iCofVar = -1, truthId = Abc_Lit2Var(pCut->iCutFunc); + if ( truthId >= Vec_StrSize(p->vTtVars[pCut->nLeaves]) || Vec_StrEntry(p->vTtVars[pCut->nLeaves], truthId) == (char)-1 ) + { + while ( truthId >= Vec_StrSize(p->vTtVars[pCut->nLeaves]) ) + Vec_StrPush( p->vTtVars[pCut->nLeaves], (char)-1 ); + iCofVar = Abc_TtCheckCondDep( If_CutTruthWR(p, pCut), pCut->nLeaves, p->pPars->nLutSize / 2 ); + Vec_StrWriteEntry( p->vTtVars[pCut->nLeaves], truthId, (char)iCofVar ); + } + iCofVar = Vec_StrEntry(p->vTtVars[pCut->nLeaves], truthId); + assert( iCofVar >= 0 && iCofVar <= (int)pCut->nLeaves ); + pCut->fUseless = (int)(iCofVar == (int)pCut->nLeaves && pCut->nLeaves > 0); + p->nCutsUselessAll += pCut->fUseless; + p->nCutsUseless[pCut->nLeaves] += pCut->fUseless; + p->nCutsCountAll++; + p->nCutsCount[pCut->nLeaves]++; + } } // compute the application-specific cost and depth |