Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions src/aig/gia/giaTtopt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ class TruthTable {
if(logwidth > lww) {
int nScopeSize = 1 << (logwidth - lww);
for(int i = 0; i < nScopeSize && (fEq || fCompl); i++) {
fEq &= t[nScopeSize * index1 + i] == t[nScopeSize * index2 + i];
fCompl &= t[nScopeSize * index1 + i] == ~t[nScopeSize * index2 + i];
fEq &= (t[nScopeSize * index1 + i] == t[nScopeSize * index2 + i]);
fCompl &= (t[nScopeSize * index1 + i] == ~t[nScopeSize * index2 + i]);
}
} else {
word value = GetValue(index1, lev) ^ GetValue(index2, lev);
Expand Down Expand Up @@ -174,18 +174,18 @@ class TruthTable {
fOne &= !(~value);
}
if(fZero || fOne) {
return -2 ^ fOne;
return -2 ^ (int)fOne;
}
for(unsigned j = 0; j < vvIndices[lev].size(); j++) {
int index2 = vvIndices[lev][j];
bool fEq = true;
bool fCompl = true;
for(int i = 0; i < nScopeSize && (fEq || fCompl); i++) {
fEq &= t[nScopeSize * index + i] == t[nScopeSize * index2 + i];
fCompl &= t[nScopeSize * index + i] == ~t[nScopeSize * index2 + i];
fEq &= (t[nScopeSize * index + i] == t[nScopeSize * index2 + i]);
fCompl &= (t[nScopeSize * index + i] == ~t[nScopeSize * index2 + i]);
}
if(fEq || fCompl) {
return (j << 1) ^ fCompl;
return (j << 1) ^ (int)fCompl;
}
}
} else {
Expand Down Expand Up @@ -553,7 +553,7 @@ class TruthTableReo : public TruthTable {
}
int *place = Hash_Int2ManLookup(unique, cof0, cof1);
if(*place) {
return (Hash_IntObjData2(unique, *place) << 1) ^ fCompl;
return (Hash_IntObjData2(unique, *place) << 1) ^ (int)fCompl;
}
vvIndices[lev].push_back(index);
Hash_Int2ManInsert(unique, cof0, cof1, vvIndices[lev].size() - 1);
Expand All @@ -562,7 +562,7 @@ class TruthTableReo : public TruthTable {
if(cof0 == cof1) {
vvRedundantIndices[lev].push_back(index);
}
return ((vvIndices[lev].size() - 1) << 1) ^ fCompl;
return ((vvIndices[lev].size() - 1) << 1) ^ (int)fCompl;
}

int BDDRebuild(int lev) {
Expand All @@ -580,18 +580,18 @@ class TruthTableReo : public TruthTable {
bool cof1c = vvChildren[lev][i+i+1] & 1;
int cof00, cof01, cof10, cof11;
if(cof0index < 0) {
cof00 = -2 ^ cof0c;
cof01 = -2 ^ cof0c;
cof00 = -2 ^ (int)cof0c;
cof01 = -2 ^ (int)cof0c;
} else {
cof00 = vvChildren[lev+1][cof0index+cof0index] ^ cof0c;
cof01 = vvChildren[lev+1][cof0index+cof0index+1] ^ cof0c;
cof00 = vvChildren[lev+1][cof0index+cof0index] ^ (int)cof0c;
cof01 = vvChildren[lev+1][cof0index+cof0index+1] ^ (int)cof0c;
}
if(cof1index < 0) {
cof10 = -2 ^ cof1c;
cof11 = -2 ^ cof1c;
cof10 = -2 ^ (int)cof1c;
cof11 = -2 ^ (int)cof1c;
} else {
cof10 = vvChildren[lev+1][cof1index+cof1index] ^ cof1c;
cof11 = vvChildren[lev+1][cof1index+cof1index+1] ^ cof1c;
cof10 = vvChildren[lev+1][cof1index+cof1index] ^ (int)cof1c;
cof11 = vvChildren[lev+1][cof1index+cof1index+1] ^ (int)cof1c;
}
int newcof0 = BDDRebuildOne(index << 1, cof00, cof10, lev + 1, unique, vChildrenLow);
int newcof1 = BDDRebuildOne((index << 1) ^ 1, cof01, cof11, lev + 1, unique, vChildrenLow);
Expand Down Expand Up @@ -900,7 +900,7 @@ class TruthTableCare : public TruthTableRewrite {

void Merge(int index1, int index2, int lev, bool fCompl) {
MergeCare(index1, index2, lev);
vvMergedIndices[lev].push_back(std::make_pair((index1 << 1) ^ fCompl, index2));
vvMergedIndices[lev].push_back(std::make_pair((index1 << 1) ^ (int)fCompl, index2));
}

int BDDBuildOne(int index, int lev) {
Expand Down Expand Up @@ -1023,7 +1023,7 @@ class TruthTableLevelTSM : public TruthTableCare {
fOne &= !(~value & cvalue);
}
if(fZero || fOne) {
return -2 ^ fOne;
return -2 ^ (int)fOne;
}
for(unsigned j = 0; j < vvIndices[lev].size(); j++) {
int index2 = vvIndices[lev][j];
Expand All @@ -1036,7 +1036,7 @@ class TruthTableLevelTSM : public TruthTableCare {
fCompl &= !(~value & cvalue);
}
if(fEq || fCompl) {
return (index2 << 1) ^ !fEq;
return (index2 << 1) ^ (int)!fEq;
}
}
} else {
Expand Down