Commit 2b85ef06 by Alan Mishchenko

Compiler warnings.

parent 80f46fa2
......@@ -93,8 +93,8 @@ static inline Rtm_Init_t Rtm_ObjGetLast1( Rtm_Edg_t * pEdge ) { retur
static inline Rtm_Init_t Rtm_ObjGetOne1( Rtm_Edg_t * pEdge, int i ) { assert( i < (int)pEdge->nLats ); return (Rtm_Init_t)((pEdge->LData >> (i << 1)) & 3); }
static inline Rtm_Init_t Rtm_ObjRemFirst1( Rtm_Edg_t * pEdge ) { int Val = pEdge->LData & 3; pEdge->LData >>= 2; assert(pEdge->nLats > 0); pEdge->nLats--; return (Rtm_Init_t)Val; }
static inline Rtm_Init_t Rtm_ObjRemLast1( Rtm_Edg_t * pEdge ) { int Val = (pEdge->LData >> ((pEdge->nLats-1)<<1)) & 3; pEdge->LData ^= Val << ((pEdge->nLats-1)<<1); assert(pEdge->nLats > 0); pEdge->nLats--; return (Rtm_Init_t)Val; }
static inline void Rtm_ObjAddFirst1( Rtm_Edg_t * pEdge, Rtm_Init_t Val ) { assert( Val > 0 && Val < 4 ); pEdge->LData = (pEdge->LData << 2) | Val; pEdge->nLats++; }
static inline void Rtm_ObjAddLast1( Rtm_Edg_t * pEdge, Rtm_Init_t Val ) { assert( Val > 0 && Val < 4 ); pEdge->LData |= Val << (pEdge->nLats<<1); pEdge->nLats++; }
static inline void Rtm_ObjAddFirst1( Rtm_Edg_t * pEdge, Rtm_Init_t Val ) { assert( Val > 0 ); pEdge->LData = (pEdge->LData << 2) | Val; pEdge->nLats++; }
static inline void Rtm_ObjAddLast1( Rtm_Edg_t * pEdge, Rtm_Init_t Val ) { assert( Val > 0 ); pEdge->LData |= Val << (pEdge->nLats<<1); pEdge->nLats++; }
static inline Rtm_Init_t Rtm_ObjGetFirst2( Rtm_Man_t * p, Rtm_Edg_t * pEdge ) { return (Rtm_Init_t)Rtm_InitGetTwo( p->pExtra + pEdge->LData, 0 ); }
static inline Rtm_Init_t Rtm_ObjGetLast2( Rtm_Man_t * p, Rtm_Edg_t * pEdge ) { return (Rtm_Init_t)Rtm_InitGetTwo( p->pExtra + pEdge->LData, pEdge->nLats - 1 ); }
......
......@@ -186,7 +186,7 @@ static inline int Au_ObjCopy( Au_Obj_t * p ) { retur
static inline void Au_ObjSetCopy( Au_Obj_t * p, int c ) { Vec_IntWriteEntry( &Au_ObjNtk(p)->vCopies, Au_ObjId(p), c ); }
static inline int Au_ObjFanout( Au_Obj_t * p, int i ) { assert(p->Type == AU_OBJ_BOX && i >= 0 && i < p->Fanins[p->nFanins] && p->Fanins[i]); return p->Fanins[p->nFanins + 1 + i]; }
static inline int Au_ObjSetFanout( Au_Obj_t * p, int i, int f ) { assert(p->Type == AU_OBJ_BOX && i >= 0 && i < p->Fanins[p->nFanins] && p->Fanins[i] == 0 && f > 0); p->Fanins[p->nFanins + 1 + i] = f; }
static inline void Au_ObjSetFanout( Au_Obj_t * p, int i, int f ) { assert(p->Type == AU_OBJ_BOX && i >= 0 && i < p->Fanins[p->nFanins] && p->Fanins[i] == 0 && f > 0); p->Fanins[p->nFanins + 1 + i] = f; }
static inline void Au_NtkIncrementTravId( Au_Ntk_t * p ) { if (p->vTravIds.pArray == NULL) Vec_IntFill(&p->vTravIds, Au_NtkObjNumMax(p)+500, 0); p->nTravIds++; assert(p->nTravIds < (1<<30)); }
static inline void Au_ObjSetTravIdCurrent( Au_Obj_t * p ) { Vec_IntSetEntry(&Au_ObjNtk(p)->vTravIds, Au_ObjId(p), Au_ObjNtk(p)->nTravIds ); }
......
......@@ -1506,8 +1506,8 @@ int match1by1(Abc_Ntk_t * pNtk1, Vec_Ptr_t ** nodesInLevel1, Vec_Int_t ** iMatch
vSupp = Abc_NtkNodeSupport( FpNtk2, &pObj, 1 );
for(n = 0; n < vSupp->nSize; n++)
if( Abc_ObjId((Abc_Obj_t *)vSupp->pArray[n])-1 < (unsigned)(Vec_IntSize(iMatch2[i]))-idx+1 &&
Abc_ObjId((Abc_Obj_t *)vSupp->pArray[n])-1 >= 0)
if( (int)Abc_ObjId((Abc_Obj_t *)vSupp->pArray[n])-1 < (Vec_IntSize(iMatch2[i]))-idx+1 &&
(int)Abc_ObjId((Abc_Obj_t *)vSupp->pArray[n])-1 >= 0)
suppNum2[Abc_ObjId((Abc_Obj_t *)vSupp->pArray[n])-1] += Vec_IntFind( matchedOutputs2, m) + 1;
Vec_PtrFree( vSupp );
......
......@@ -1632,7 +1632,6 @@ ddSymmSiftingBackward(
Move *move;
int res = -1;
size = size;
for (move = moves; move != NULL; move = move->next) {
if (move->size < size) {
size = move->size;
......
......@@ -283,7 +283,7 @@ void printCCtrInfo(cycleCtr* cCtr, int nFuncs)
// if highest bit in F ( all ones min term ) is one => inverse
// returns: if pInOnt changed(minimized) by function return 1 if not 0
inline int minimalInitialFlip1(word* pInOut, int nVars)
int minimalInitialFlip1(word* pInOut, int nVars)
{
word oneWord=1;
if( (pInOut[Kit_TruthWordNum_64bit( nVars ) -1]>>63) & oneWord )
......@@ -298,7 +298,7 @@ inline int minimalInitialFlip1(word* pInOut, int nVars)
// keeps smaller.
// same for all vars in F.
// returns: if pInOnt changed(minimized) by function return 1 if not 0
inline int minimalFlip1(word* pInOut, word* pMinimal, word* PDuplicat, int nVars)
int minimalFlip1(word* pInOut, word* pMinimal, word* PDuplicat, int nVars)
{
int i;
int blockSize = Kit_TruthWordNum_64bit( nVars )*sizeof(word);
......@@ -329,7 +329,7 @@ inline int minimalFlip1(word* pInOut, word* pMinimal, word* PDuplicat, int nVar
// keeps smaller.
// same for all vars in F.
// returns: if pInOnt changed(minimized) by function return 1 if not 0
inline int minimalSwap1(word* pInOut, word* pMinimal, word* PDuplicat, int nVars)
int minimalSwap1(word* pInOut, word* pMinimal, word* PDuplicat, int nVars)
{
int i;
int blockSize = Kit_TruthWordNum_64bit( nVars )*sizeof(word);
......@@ -359,7 +359,7 @@ inline int minimalSwap1(word* pInOut, word* pMinimal, word* PDuplicat, int nVar
// if highest bit in F ( all ones min term ) is one => inverse
// returns: if pInOnt changed(minimized) by function return 1 if not 0
inline int minimalInitialFlip(word* pInOut, int nVars, unsigned* p_uCanonPhase)
int minimalInitialFlip(word* pInOut, int nVars, unsigned* p_uCanonPhase)
{
word oneWord=1;
if( (pInOut[Kit_TruthWordNum_64bit( nVars ) -1]>>63) & oneWord )
......@@ -375,7 +375,7 @@ inline int minimalInitialFlip(word* pInOut, int nVars, unsigned* p_uCanonPhase)
// keeps smaller.
// same for all vars in F.
// returns: if pInOnt changed(minimized) by function return 1 if not 0
inline int minimalFlip(word* pInOut, word* pMinimal, word* PDuplicat, int nVars, unsigned* p_uCanonPhase)
int minimalFlip(word* pInOut, word* pMinimal, word* PDuplicat, int nVars, unsigned* p_uCanonPhase)
{
int i;
unsigned minTemp = *p_uCanonPhase;
......@@ -411,7 +411,7 @@ inline int minimalFlip(word* pInOut, word* pMinimal, word* PDuplicat, int nVars
}
// swaps iVar and iVar+1 elements in pCanonPerm ant p_uCanonPhase
inline void swapInfoAdjacentVars(int iVar, char * pCanonPerm, unsigned* p_uCanonPhase)
void swapInfoAdjacentVars(int iVar, char * pCanonPerm, unsigned* p_uCanonPhase)
{
char Temp = pCanonPerm[iVar];
pCanonPerm[iVar] = pCanonPerm[iVar+1];
......@@ -435,7 +435,7 @@ inline void swapInfoAdjacentVars(int iVar, char * pCanonPerm, unsigned* p_uCanon
/*
// this version is buggy and is fixed below
inline int minimalSwap(word* pInOut, word* pMinimal, word* PDuplicat, int nVars, char * pCanonPerm, char * tempArray, unsigned* p_uCanonPhase)
int minimalSwap(word* pInOut, word* pMinimal, word* PDuplicat, int nVars, char * pCanonPerm, char * tempArray, unsigned* p_uCanonPhase)
{
int i;
int blockSizeWord = Kit_TruthWordNum_64bit( nVars )*sizeof(word);
......@@ -472,7 +472,7 @@ inline int minimalSwap(word* pInOut, word* pMinimal, word* PDuplicat, int nVars
}
*/
inline int minimalSwap(word* pInOut, word* pMinimal, word* PDuplicat, int nVars, char * pCanonPerm, char * tempArray, unsigned* p_uCanonPhase)
int minimalSwap(word* pInOut, word* pMinimal, word* PDuplicat, int nVars, char * pCanonPerm, char * tempArray, unsigned* p_uCanonPhase)
{
int i;
int blockSizeWord = Kit_TruthWordNum_64bit( nVars )*sizeof(word);
......
......@@ -259,7 +259,7 @@ static inline void If_Dec08MoveTo( word * pF, int nVars, int v, int p, int Pla2V
If_Dec08Copy( pF, pIn, nVars );
assert( Pla2Var[p] == v );
}
/*
// derive binary function
static inline int If_Dec08DeriveCount2( word * pF, word * pRes, int nVars )
{
......@@ -283,7 +283,7 @@ static inline int If_Dec08DeriveCount2( word * pF, word * pRes, int nVars )
*pRes = ((iCof1 << nShift) | iCof0);
return MaskDec;
}
*/
static inline word If_DecTruthStretch( word t, int nVars )
{
assert( nVars > 1 );
......
......@@ -256,7 +256,7 @@ static inline void If_Dec10MoveTo( word * pF, int nVars, int v, int p, int Pla2V
If_Dec10Copy( pF, pIn, nVars );
assert( Pla2Var[p] == v );
}
/*
// derive binary function
static inline int If_Dec10DeriveCount2( word * pF, word * pRes, int nVars )
{
......@@ -280,7 +280,7 @@ static inline int If_Dec10DeriveCount2( word * pF, word * pRes, int nVars )
*pRes = ((iCof1 << nShift) | iCof0);
return MaskDec;
}
*/
static inline word If_DecTruthStretch( word t, int nVars )
{
assert( nVars > 1 );
......
......@@ -2156,9 +2156,9 @@ float If_CutDelayLutStruct( If_Man_t * p, If_Cut_t * pCut, char * pStr, float Wi
return ABC_INFINITY;
// compute the delay
Delays[nLeaves] = If_CluDelayMax( &G1, Delays ) + (WireDelay == 0.0)?1.0:WireDelay;
Delays[nLeaves] = If_CluDelayMax( &G1, Delays ) + ((WireDelay == 0.0)?1.0:WireDelay);
if ( G2.nVars )
Delays[nLeaves+1] = If_CluDelayMax( &G2, Delays ) + (WireDelay == 0.0)?1.0:WireDelay;
Delays[nLeaves+1] = If_CluDelayMax( &G2, Delays ) + ((WireDelay == 0.0)?1.0:WireDelay);
// mark used groups
for ( i = 0; i < G1.nVars; i++ )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment