summaryrefslogtreecommitdiff
path: root/src/relooper/Relooper.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-06-01 13:49:52 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-06-01 13:49:52 -0700
commit6cf99050e7cffd0c13dbced3e3559afd7a70f006 (patch)
treea04b7293e9f619c0ca731d4eaba58737e69773db /src/relooper/Relooper.cpp
parentd38a6d646be9ba6eb55a9dbca50c9ea9c6e7b764 (diff)
improve relooper debugging
Diffstat (limited to 'src/relooper/Relooper.cpp')
-rw-r--r--src/relooper/Relooper.cpp12
1 files changed, 6 insertions, 6 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());
}
}
}