lrh
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 29 Mar 2003 14:28:36 +0000 (14:28 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 29 Mar 2003 14:28:36 +0000 (14:28 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2429 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCBBlock.h
src/SDCCcflow.c

index c455ed7b9798d8915a0cc71a2a3a48c20b48e353..68c29061404c96f5c38b2ef3cfbf12eff522c43a 100644 (file)
@@ -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 */
index 95bce8b09e3d6e42a3cbedfd8deb57cf127e14bf..e3befba85b65249664df21bdf03121b9aa48e650 100644 (file)
@@ -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 */