From 303baf27cf34c2a57db97c4c567fd744241fa14b Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Wed, 2 Jul 2008 08:01:00 -0700 Subject: Version abc80702 --- src/aig/kit/cloud.h | 4 ++-- src/aig/kit/kitBdd.c | 2 +- src/aig/kit/kitCloud.c | 8 +++++--- src/aig/kit/kitDsd.c | 18 +++++++++++++----- src/aig/kit/kitSop.c | 4 +++- 5 files changed, 24 insertions(+), 12 deletions(-) (limited to 'src/aig/kit') diff --git a/src/aig/kit/cloud.h b/src/aig/kit/cloud.h index fa7f2fce..ec8e9059 100644 --- a/src/aig/kit/cloud.h +++ b/src/aig/kit/cloud.h @@ -176,8 +176,8 @@ struct cloudCacheEntry3 // the three-argument cache #define DD_P2 4256249 #define DD_P3 741457 #define DD_P4 1618033999 -#define cloudHashCudd2(f,g,s) ((((unsigned)(f) * DD_P1 + (unsigned)(g)) * DD_P2) >> (s)) -#define cloudHashCudd3(f,g,h,s) (((((unsigned)(f) * DD_P1 + (unsigned)(g)) * DD_P2 + (unsigned)(h)) * DD_P3) >> (s)) +#define cloudHashCudd2(f,g,s) ((((unsigned)(PORT_PTRUINT_T)(f) * DD_P1 + (unsigned)(PORT_PTRUINT_T)(g)) * DD_P2) >> (s)) +#define cloudHashCudd3(f,g,h,s) (((((unsigned)(PORT_PTRUINT_T)(f) * DD_P1 + (unsigned)(PORT_PTRUINT_T)(g)) * DD_P2 + (unsigned)(PORT_PTRUINT_T)(h)) * DD_P3) >> (s)) // node complementation (using node) #define Cloud_Regular(p) ((CloudNode*)(((PORT_PTRUINT_T)(p)) & ~01)) // get the regular node (w/o bubble) diff --git a/src/aig/kit/kitBdd.c b/src/aig/kit/kitBdd.c index 9c8d4f7a..75caf949 100644 --- a/src/aig/kit/kitBdd.c +++ b/src/aig/kit/kitBdd.c @@ -88,7 +88,7 @@ DdNode * Kit_SopToBdd( DdManager * dd, Kit_Sop_t * cSop, int nVars ) DdNode * Kit_GraphToBdd( DdManager * dd, Kit_Graph_t * pGraph ) { DdNode * bFunc, * bFunc0, * bFunc1; - Kit_Node_t * pNode; + Kit_Node_t * pNode = NULL; // Suppress "might be used uninitialized" int i; // sanity checks diff --git a/src/aig/kit/kitCloud.c b/src/aig/kit/kitCloud.c index 7b160fea..525f89f5 100644 --- a/src/aig/kit/kitCloud.c +++ b/src/aig/kit/kitCloud.c @@ -304,14 +304,16 @@ unsigned * Kit_TruthCompose( CloudManager * dd, unsigned * pTruth, int nVars, void Kit_TruthCofSupports( Vec_Int_t * vBddDir, Vec_Int_t * vBddInv, int nVars, Vec_Int_t * vMemory, unsigned * puSupps ) { Kit_Mux_t Mux; - unsigned * puSuppAll, * pThis, * pFan0, * pFan1; + unsigned * puSuppAll; + unsigned * pThis = NULL; // Suppress "might be used uninitialized" + unsigned * pFan0, * pFan1; int i, v, Var, Entry, nSupps; nSupps = 2 * nVars; // extend storage if ( Vec_IntSize( vMemory ) < nSupps * Vec_IntSize(vBddDir) ) Vec_IntGrow( vMemory, nSupps * Vec_IntSize(vBddDir) ); - puSuppAll = Vec_IntArray( vMemory ); + puSuppAll = (unsigned *)Vec_IntArray( vMemory ); // clear storage for the const node memset( puSuppAll, 0, sizeof(unsigned) * nSupps ); // compute supports from nodes @@ -336,7 +338,7 @@ void Kit_TruthCofSupports( Vec_Int_t * vBddDir, Vec_Int_t * vBddInv, int nVars, // extend storage if ( Vec_IntSize( vMemory ) < nSupps * Vec_IntSize(vBddInv) ) Vec_IntGrow( vMemory, nSupps * Vec_IntSize(vBddInv) ); - puSuppAll = Vec_IntArray( vMemory ); + puSuppAll = (unsigned *)Vec_IntArray( vMemory ); // clear storage for the const node memset( puSuppAll, 0, sizeof(unsigned) * nSupps ); // compute supports from nodes diff --git a/src/aig/kit/kitDsd.c b/src/aig/kit/kitDsd.c index a397d452..8d670419 100644 --- a/src/aig/kit/kitDsd.c +++ b/src/aig/kit/kitDsd.c @@ -1018,7 +1018,7 @@ unsigned Kit_DsdNonDsdSupports( Kit_DsdNtk_t * pNtk ) SeeAlso [] ***********************************************************************/ -void Kit_DsdExpandCollectAnd_rec( Kit_DsdNtk_t * p, int iLit, int * piLitsNew, int * nLitsNew ) +void Kit_DsdExpandCollectAnd_rec( Kit_DsdNtk_t * p, unsigned iLit, unsigned * piLitsNew, int * nLitsNew ) { Kit_DsdObj_t * pObj; unsigned i, iLitFanin; @@ -1045,7 +1045,7 @@ void Kit_DsdExpandCollectAnd_rec( Kit_DsdNtk_t * p, int iLit, int * piLitsNew, i SeeAlso [] ***********************************************************************/ -void Kit_DsdExpandCollectXor_rec( Kit_DsdNtk_t * p, int iLit, int * piLitsNew, int * nLitsNew ) +void Kit_DsdExpandCollectXor_rec( Kit_DsdNtk_t * p, unsigned iLit, unsigned * piLitsNew, int * nLitsNew ) { Kit_DsdObj_t * pObj; unsigned i, iLitFanin; @@ -1179,7 +1179,7 @@ Kit_DsdNtk_t * Kit_DsdExpand( Kit_DsdNtk_t * p ) SeeAlso [] ***********************************************************************/ -void Kit_DsdCompSort( int pPrios[], unsigned uSupps[], unsigned char * piLits, int nVars, int piLitsRes[] ) +void Kit_DsdCompSort( int pPrios[], unsigned uSupps[], unsigned char * piLits, int nVars, unsigned piLitsRes[] ) { int nSuppSizes[16], Priority[16], pOrder[16]; int i, k, iVarBest, SuppMax, PrioMax; @@ -1236,7 +1236,8 @@ void Kit_DsdCompSort( int pPrios[], unsigned uSupps[], unsigned char * piLits, i ***********************************************************************/ int Kit_DsdShrink_rec( Kit_DsdNtk_t * pNew, Kit_DsdNtk_t * p, int iLit, int pPrios[] ) { - Kit_DsdObj_t * pObj, * pObjNew; + Kit_DsdObj_t * pObj; + Kit_DsdObj_t * pObjNew = NULL; // Suppress "might be used uninitialized" unsigned * pTruth, * pTruthNew; unsigned i, piLitsNew[16], uSupps[16]; int iLitFanin, iLitNew; @@ -2265,7 +2266,14 @@ int Kit_DsdCofactoringGetVars( Kit_DsdNtk_t ** ppNtk, int nSize, int * pVars ) ***********************************************************************/ int Kit_DsdCofactoring( unsigned * pTruth, int nVars, int * pCofVars, int nLimit, int fVerbose ) { - Kit_DsdNtk_t * ppNtks[5][16] = {0}, * pTemp; + Kit_DsdNtk_t * ppNtks[5][16] = { + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} + }; + Kit_DsdNtk_t * pTemp; unsigned * ppCofs[5][16]; int pTryVars[16], nTryVars; int nPrimeSizeMin, nPrimeSizeMax, nPrimeSizeCur; diff --git a/src/aig/kit/kitSop.c b/src/aig/kit/kitSop.c index 20ad0651..8e175dac 100644 --- a/src/aig/kit/kitSop.c +++ b/src/aig/kit/kitSop.c @@ -174,7 +174,9 @@ void Kit_SopDivideByCube( Kit_Sop_t * cSop, Kit_Sop_t * cDiv, Kit_Sop_t * vQuo, ***********************************************************************/ void Kit_SopDivideInternal( Kit_Sop_t * cSop, Kit_Sop_t * cDiv, Kit_Sop_t * vQuo, Kit_Sop_t * vRem, Vec_Int_t * vMemory ) { - unsigned uCube, uDiv, uCube2, uDiv2, uQuo; + unsigned uCube, uDiv; + unsigned uCube2 = 0; // Suppress "might be used uninitialized" + unsigned uDiv2, uQuo; int i, i2, k, k2, nCubesRem; assert( Kit_SopCubeNum(cSop) >= Kit_SopCubeNum(cDiv) ); // consider special case -- cgit v1.2.3