133 bool has_fallthrough;
179 if (iptr == bptr->
iinstr) {
186 if (iptr == bptr->
iinstr) {
192 has_fallthrough =
false;
194 has_fallthrough =
true;
209 if (has_fallthrough) {
218 tbptr = iptr->
sx.
s23.s3.jsrtarget.block;
235 tbptr = table->
block;
239 i = iptr->
sx.
s23.s3.tablehigh - iptr->
sx.
s23.s2.tablelow + 1;
244 tbptr = table->
block;
255 tbptr = iptr->
sx.
s23.s3.lookupdefault.block;
258 i = iptr->
sx.
s23.s2.lookupcount;
270 if (has_fallthrough) {
314 if (iptr == bptr->
iinstr) {
321 if (iptr == bptr->
iinstr) {
327 has_fallthrough =
false;
330 has_fallthrough =
true;
346 if (has_fallthrough) {
351 if (has_fallthrough) {
356 if (has_fallthrough) {
362 tbptr = iptr->
sx.
s23.s3.jsrtarget.block;
382 tbptr = table->
block;
393 i = iptr->
sx.
s23.s3.tablehigh - iptr->
sx.
s23.s2.tablelow + 1;
396 tbptr = table->
block;
409 tbptr = iptr->
sx.
s23.s3.lookupdefault.block;
419 i = iptr->
sx.
s23.s2.lookupcount;
433 if (has_fallthrough) {
495 for (it = zero; it; it = it->
next) {
510 for (it = zero; it; it = it->
next) {
521 b->successorcount = 0;
522 b->predecessors = NULL;
523 b->successors = NULL;
527 #if defined(ENABLE_SSA)
529 static void cfg_eliminate_edges_to_unreachable(
jitdata *jd);
547 bool unreachable_exh =
false;
572 for (bptr = ee->
start; bptr != ee->
end; bptr = bptr->
next) {
575 if (bptr->exouts > 0) {
576 bptr->exhandlercount += 1;
577 ee->
handler->expredecessorcount += 1;
586 if (ee->
handler->expredecessorcount == 0) {
590 unreachable_exh =
true;
593 for (bptr = ee->
start; bptr != ee->
end; bptr = bptr->
next) {
594 if (bptr->exouts > 0) {
596 if (bptr->exhandlers == NULL) {
601 bptr->exhandlers += bptr->exhandlercount;
604 bptr->exhandlers -= 1;
605 *(bptr->exhandlers) = ee->
handler;
607 if (ee->
handler->expredecessors == NULL) {
612 ee->
handler->expredecessors -= 1;
613 *(ee->
handler->expredecessors) = bptr;
618 if (unreachable_exh) {
638 cfg_eliminate_edges_to_unreachable(jd);
648 static void cfg_calculate_reachability(
basicblock *bptr) {
652 assert(bptr->vp == NULL);
657 if ((*itsucc)->vp == NULL) {
658 cfg_calculate_reachability(*itsucc);
662 if (bptr->exouts > 0) {
663 FOR_EACH_EXHANDLER(bptr, itsucc) {
664 if ((*itsucc)->vp == NULL) {
665 cfg_calculate_reachability(*itsucc);
690 static void cfg_eliminate_edges_to_unreachable(
jitdata *jd) {
697 if (it->vp == NULL) {
707 cfg_remove_predecessors(*itsucc, it);
714 it->expredecessorcount = 0;
bool cfg_build(jitdata *jd)
void cfg_add_root(jitdata *jd)
exception_entry * exceptiontable
void cfg_clear(jitdata *jd)
#define DMREALLOC(ptr, type, num1, num2)
void cfg_remove_root(jitdata *jd)
#define FOR_EACH_SUCCESSOR(bptr, it)
static void cfg_allocate_predecessors(basicblock *bptr)
basicblock ** predecessors
#define MZERO(ptr, type, num)
static void cfg_insert_predecessors(basicblock *bptr, basicblock *pbptr)
#define FOR_EACH_BASICBLOCK(jd, it)
union instruction::@12 sx
icmdtable_entry_t icmd_table[256]
void cfg_add_exceptional_edges(jitdata *jd)
#define FOR_EACH_INSTRUCTION(bptr, it)
struct instruction::@12::@13 s23
static void cfg_insert_successors(basicblock *bptr, basicblock *pbptr)
static void cfg_allocate_successors(basicblock *bptr)