From: johanknol Date: Sat, 29 Mar 2003 14:28:36 +0000 (+0000) Subject: lrh X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=48dec0891e1e0e1a2178f4cbabf13a2548dbe379;p=fw%2Fsdcc lrh git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2429 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCBBlock.h b/src/SDCCBBlock.h index c455ed7b..68c29061 100644 --- a/src/SDCCBBlock.h +++ b/src/SDCCBBlock.h @@ -38,7 +38,7 @@ typedef struct eBBlock unsigned int hasFcall:1; /* has a function call */ unsigned int noPath:1; /* there is no path from _entry to this block */ unsigned int isLastInLoop:1; /* is the last block in a loop */ - unsigned int hasConditionalExit; /* this block ends with a return or goto from a conditional block*/ + struct eBBlock *isConditionalExitFrom; /* this block ends with a return or goto from a conditional block*/ symbol *entryLabel; /* entry label */ iCode *sch; /* pointer to start of code chain */ diff --git a/src/SDCCcflow.c b/src/SDCCcflow.c index 95bce8b0..e3befba8 100644 --- a/src/SDCCcflow.c +++ b/src/SDCCcflow.c @@ -133,13 +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))) { - 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 */