X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=src%2FSDCCcflow.c;h=e3befba85b65249664df21bdf03121b9aa48e650;hb=724cd0b658ac11ac5518ae566fcd3e9b3f822acf;hp=430299dde3ed5ec219069113c9621acbb1b318c0;hpb=58deec918b073f3c97ef83aa63e6893b25947f8d;p=fw%2Fsdcc diff --git a/src/SDCCcflow.c b/src/SDCCcflow.c index 430299dd..e3befba8 100644 --- a/src/SDCCcflow.c +++ b/src/SDCCcflow.c @@ -120,11 +120,9 @@ eBBSuccessors (eBBlock ** ebbs, int count) if (ebbs[i]->ech) { -#if 0 if (ebbs[i]->ech->op != GOTO && ebbs[i]->ech->op != RETURN && ebbs[i]->ech->op != JUMPTABLE) -#endif { int j = i + 1; @@ -133,6 +131,12 @@ eBBSuccessors (eBBlock ** ebbs, int count) addSuccessor (ebbs[i], ebbs[j]); /* add it */ } + else + { + if (i && ebbs[i-1]->ech && ebbs[i-1]->ech->op==IFX) { + ebbs[i]->isConditionalExitFrom=ebbs[i-1]; + } + } } /* no instructions in the block */ /* could happen for dummy blocks */ else @@ -162,7 +166,7 @@ eBBSuccessors (eBBlock ** ebbs, int count) 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 */