diff options
-rw-r--r-- | src/relooper/Relooper.cpp | 12 | ||||
-rw-r--r-- | src/relooper/test_debug.txt | 68 |
2 files changed, 33 insertions, 47 deletions
diff --git a/src/relooper/Relooper.cpp b/src/relooper/Relooper.cpp index 65d4eca0..cb989e20 100644 --- a/src/relooper/Relooper.cpp +++ b/src/relooper/Relooper.cpp @@ -1029,12 +1029,12 @@ void Relooper::SetAsmJSMode(int On) { void DebugDump(BlockSet &Blocks, const char *prefix) { if (prefix) printf("%s ", prefix); for (BlockSet::iterator iter = Blocks.begin(); iter != Blocks.end(); iter++) { - printf("%d:\n", (*iter)->Id); - for (BlockBranchMap::iterator iter2 = (*iter)->BranchesOut.begin(); iter2 != (*iter)->BranchesOut.end(); iter2++) { - printf(" OUT %d\n", iter2->first->Id); - } - for (BlockSet::iterator iter2 = (*iter)->BranchesIn.begin(); iter2 != (*iter)->BranchesIn.end(); iter2++) { - printf(" IN %d\n", (*iter2)->Id); + Block *Curr = *iter; + printf("%d:\n", Curr->Id); + for (BlockBranchMap::iterator iter2 = Curr->BranchesOut.begin(); iter2 != Curr->BranchesOut.end(); iter2++) { + Block *Other = iter2->first; + printf(" -> %d\n", Other->Id); + assert(Other->BranchesIn.find(Curr) != Other->BranchesIn.end()); } } } diff --git a/src/relooper/test_debug.txt b/src/relooper/test_debug.txt index a6823d56..d18ed875 100644 --- a/src/relooper/test_debug.txt +++ b/src/relooper/test_debug.txt @@ -34,86 +34,72 @@ int main() { // Process() called // Process() running blocks : 1: - OUT 2 - OUT 4 + -> 2 + -> 4 2: - OUT 3 - OUT 4 - IN 1 + -> 3 + -> 4 3: - OUT 4 - IN 2 + -> 4 4: - IN 1 - IN 2 - IN 3 entries: 1: - OUT 2 - OUT 4 + -> 2 + -> 4 // creating simple block with block #1 // Solipsizing branches into 2 relevant to solipsize: 1: - OUT 2 - OUT 4 + -> 2 + -> 4 // eliminated branch from 1 // Solipsizing branches into 4 relevant to solipsize: 1: - OUT 4 + -> 4 // eliminated branch from 1 // Process() running blocks : 2: - OUT 3 - OUT 4 + -> 3 + -> 4 3: - OUT 4 - IN 2 + -> 4 4: - IN 2 - IN 3 entries: 2: - OUT 3 - OUT 4 + -> 3 + -> 4 4: - IN 2 - IN 3 // Investigated independent groups: group: 2: - OUT 3 - OUT 4 + -> 3 + -> 4 3: - OUT 4 - IN 2 + -> 4 // Independent groups: 1 // Handleable independent groups: 1 // creating multiple block with 1 inner groups // multiple group with entry 2: 2: - OUT 3 - OUT 4 + -> 3 + -> 4 3: - OUT 4 - IN 2 + -> 4 // Solipsizing branches into 4 relevant to solipsize: 2: - OUT 3 - OUT 4 + -> 3 + -> 4 3: - OUT 4 - IN 2 + -> 4 // eliminated branch from 2 // eliminated branch from 3 // Process() called // Process() running blocks : 2: - OUT 3 + -> 3 3: - IN 2 entries: 2: - OUT 3 + -> 3 // creating simple block with block #2 // Solipsizing branches into 3 relevant to solipsize: 2: - OUT 3 + -> 3 // eliminated branch from 2 // Process() running blocks : 3: |