+//#define LIVERANGEHUNT
+#ifdef LIVERANGEHUNT
+ #define LRH(x) x
+#else
+ #define LRH(x)
+#endif
/*-------------------------------------------------------------------------
SDCCcflow.c - source file for control flow analysis
addSuccessor (ebbs[i], ebbs[j]); /* add it */
}
+ else
+ {
+ int j=i;
+ while (j--) {
+ if (ebbs[j]->ech && ebbs[j]->ech->op==IFX &&
+ (isSymbolEqual(IC_TRUE(ebbs[j]->ech), ebbs[i]->entryLabel) ||
+ isSymbolEqual(IC_FALSE(ebbs[j]->ech), ebbs[i]->entryLabel))) {
+ LRH(printf ("%s has a conditional exit from %s\n", ebbs[i]->entryLabel->name, ebbs[j]->entryLabel->name));
+ ebbs[i]->hasConditionalExit=1;
+ }
+ }
+ }
} /* no instructions in the block */
/* could happen for dummy blocks */
else
switch (ic->op)
{
case GOTO: /* goto has edge to label */
- succ = eBBWithEntryLabel (ebbs, ic->argLabel.label, count);
+ succ = eBBWithEntryLabel (ebbs, ic->label, count);
break;
case IFX: /* conditional jump */