48 int nNew, Gain, nGain = 0, nVars = 0;
57 if ( pObj->
nRefs == 0 )
67 if ( pFan->
nRefs != 1 )
103 printf(
"Total gain = %d. Vars = %d.\n", nGain, nVars );
169 int Order[16], Costs[16];
173 if ( pObj->
nRefs == 0 )
187 for ( k = 0; k < pCut->
nFanins - 1; k++ )
189 if ( Costs[Order[k]] <= Costs[Order[k+1]] )
192 Order[k] = Order[k+1];
196 }
while ( fChanges );
200 for ( k = 0; (k < (int)(pCut)->nFanins) && ((pFan) =
Aig_ManObj(p->pManAig, (pCut)->pFanins[Order[k]])); k++ )
205 if ( pFan->
nRefs != 1 )
214 if ( pCutRes == NULL || pCutRes->
Cost == 127 || pCutRes->
Cost > pCut->
Cost + pCutFan->
Cost )
static Cnf_Cut_t * Cnf_ObjBestCut(Aig_Obj_t *pObj)
void Aig_MmFlexRestart(Aig_MmFlex_t *p)
static Aig_Obj_t * Aig_ManObj(Aig_Man_t *p, int i)
static void Cnf_ObjSetBestCut(Aig_Obj_t *pObj, Cnf_Cut_t *pCut)
void Cnf_ManPostprocess(Cnf_Man_t *p)
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
Cnf_Cut_t * Cnf_CutCompose(Cnf_Man_t *p, Cnf_Cut_t *pCut, Cnf_Cut_t *pCutFan, int iFan)
#define Aig_ManForEachNode(p, pObj, i)
#define ABC_NAMESPACE_IMPL_END
#define Cnf_CutForEachLeaf(p, pCut, pLeaf, i)
ABC_NAMESPACE_IMPL_START void Cnf_ManPostprocess_old(Cnf_Man_t *p)
DECLARATIONS ///.
void Cnf_CutUpdateRefs(Cnf_Man_t *p, Cnf_Cut_t *pCut, Cnf_Cut_t *pCutFan, Cnf_Cut_t *pCutRes)
void Cnf_ManFreeCuts(Cnf_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
void Cnf_CutFree(Cnf_Cut_t *pCut)
Cnf_Cut_t * Cnf_CutCreate(Cnf_Man_t *p, Aig_Obj_t *pObj)
#define Aig_ManForEachObj(p, pObj, i)
#define Dar_CutForEachLeaf(p, pCut, pLeaf, i)
typedefABC_NAMESPACE_HEADER_START struct Cnf_Man_t_ Cnf_Man_t
INCLUDES ///.
void Cnf_ManTransferCuts(Cnf_Man_t *p)