summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2022-09-19 15:57:48 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2022-09-19 15:57:48 -0700
commit47c153629f78073bcfda223b8e9885e2280d4108 (patch)
treeb376426618d6a730ae0a2e18a2982e2b706745ca
parentfa6cdf9b48eff5a70bd9272fbc09e693fbe7febe (diff)
downloadabc-47c153629f78073bcfda223b8e9885e2280d4108.tar.gz
abc-47c153629f78073bcfda223b8e9885e2280d4108.tar.bz2
abc-47c153629f78073bcfda223b8e9885e2280d4108.zip
Compiler warnings.
-rw-r--r--abclib.dsp4
-rw-r--r--src/aig/gia/giaTtopt.cpp34
2 files changed, 27 insertions, 11 deletions
diff --git a/abclib.dsp b/abclib.dsp
index 7006941b..d460427c 100644
--- a/abclib.dsp
+++ b/abclib.dsp
@@ -5299,6 +5299,10 @@ SOURCE=.\src\aig\gia\giaTsim.c
# End Source File
# Begin Source File
+SOURCE=.\src\aig\gia\giaTtopt.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\src\aig\gia\giaUnate.c
# End Source File
# Begin Source File
diff --git a/src/aig/gia/giaTtopt.cpp b/src/aig/gia/giaTtopt.cpp
index 8939a87b..398bc7ff 100644
--- a/src/aig/gia/giaTtopt.cpp
+++ b/src/aig/gia/giaTtopt.cpp
@@ -1,4 +1,11 @@
// Author : Yukio Miyasaka
+
+#ifdef _WIN32
+#ifndef __MINGW32__
+#pragma warning(disable : 4786) // warning C4786: identifier was truncated to '255' characters in the browser information
+#endif
+#endif
+
#include <vector>
#include <algorithm>
#include <cassert>
@@ -301,14 +308,15 @@ public:
Save(0);
SaveIndices(0);
std::vector<int> vars(nInputs);
- for(int i = 0; i < nInputs; i++) {
+ int i;
+ for(i = 0; i < nInputs; i++) {
vars[i] = i;
}
std::vector<unsigned> vCounts(nInputs);
- for(int i = 0; i < nInputs; i++) {
+ for(i = 0; i < nInputs; i++) {
vCounts[i] = BDDNodeCountLevel(vLevels[i]);
}
- for(int i = 1; i < nInputs; i++) {
+ for(i = 1; i < nInputs; i++) {
int j = i;
while(j > 0 && vCounts[vars[j-1]] < vCounts[vars[j]]) {
std::swap(vars[j], vars[j-1]);
@@ -316,7 +324,8 @@ public:
}
}
bool turn = true;
- for(unsigned j = 0; j < vars.size(); j++) {
+ unsigned j;
+ for(j = 0; j < vars.size(); j++) {
int var = vars[j];
bool updated = false;
int lev = vLevels[var];
@@ -371,10 +380,11 @@ public:
Save(2);
for(int i = 0; i < nRound; i++) {
std::vector<int> vLevelsNew(nInputs);
- for(int j = 0; j < nInputs; j++) {
+ int j;
+ for(j = 0; j < nInputs; j++) {
vLevelsNew[j] = j;
}
- for(int j = nInputs - 1; j > 0; j--) {
+ for(j = nInputs - 1; j > 0; j--) {
int d = rand() % j;
std::swap(vLevelsNew[j], vLevelsNew[d]);
}
@@ -420,10 +430,11 @@ public:
vvIndices.resize(nInputs);
std::vector<std::vector<int> > vvNodes(nInputs);
std::vector<int> vInputs(nInputs);
- for(int i = 0; i < nInputs; i++) {
+ int i;
+ for(i = 0; i < nInputs; i++) {
vInputs[vLevels[i]] = Vec_IntEntry(vSupp, nInputs - i - 1) << 1;
}
- for(int i = 0; i < nOutputs; i++) {
+ for(i = 0; i < nOutputs; i++) {
int node = BDDGenerateAigRec(pNew, vInputs, vvNodes, i, 0);
Gia_ManAppendCo(pNew, node);
}
@@ -918,17 +929,18 @@ public:
int BDDRebuild(int lev) {
RestoreCare();
- for(int i = lev; i < nInputs; i++) {
+ int i;
+ for(i = lev; i < nInputs; i++) {
vvIndices[i].clear();
vvMergedIndices[i].clear();
if(i) {
vvRedundantIndices[i-1].clear();
}
}
- for(int i = 0; i < lev; i++) {
+ for(i = 0; i < lev; i++) {
BDDRebuildByMerge(i);
}
- for(int i = lev; i < nInputs; i++) {
+ for(i = lev; i < nInputs; i++) {
if(!i) {
for(int j = 0; j < nOutputs; j++) {
if(!IsDC(j, 0)) {