X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCcflow.c;h=e3befba85b65249664df21bdf03121b9aa48e650;hb=48dec0891e1e0e1a2178f4cbabf13a2548dbe379;hp=2da48baa65430991aebd56a1ed34b4d16e0d74a4;hpb=40cd2beaddfccdd440379feea8eaa52ab65c040c;p=fw%2Fsdcc diff --git a/src/SDCCcflow.c b/src/SDCCcflow.c index 2da48baa..e3befba8 100644 --- a/src/SDCCcflow.c +++ b/src/SDCCcflow.c @@ -1,9 +1,3 @@ -//#define LIVERANGEHUNT -#ifdef LIVERANGEHUNT - #define LRH(x) x -#else - #define LRH(x) -#endif /*------------------------------------------------------------------------- SDCCcflow.c - source file for control flow analysis @@ -139,14 +133,8 @@ eBBSuccessors (eBBlock ** ebbs, int count) } 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; - } + if (i && ebbs[i-1]->ech && ebbs[i-1]->ech->op==IFX) { + ebbs[i]->isConditionalExitFrom=ebbs[i-1]; } } } /* no instructions in the block */