X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fvm%2Fjit%2Fcfg.c;h=9cc8260996b94c8d72d0c5268c50dcb6c524a5f1;hb=6476bcbb66f70fb565959d523394dad518416cf4;hp=55832e8d3f9ed2fe5f5ff4efbd1d9465e7417d7a;hpb=f40f3f6c7de0cee0e8f77b0b05e3db7e8b23888a;p=cacao.git diff --git a/src/vm/jit/cfg.c b/src/vm/jit/cfg.c index 55832e8d3..9cc826099 100644 --- a/src/vm/jit/cfg.c +++ b/src/vm/jit/cfg.c @@ -141,6 +141,13 @@ bool cfg_build(jitdata *jd) bptr = jd->basicblocks; for (bptr = jd->basicblocks; bptr != NULL; bptr = bptr->next) { + + if (bptr->type == BBTYPE_EXH) { + /* predecessorcount for exception handlers is initialized to -1, + so we need to fix it to 0. */ + bptr->predecessorcount += 1; + } + if ((bptr->icount == 0) || (bptr->flags == BBUNDEF)) continue;