X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Firdom.c;h=a878a410b570fbade5637b837881ae169054735b;hb=bb5c6d5ce2e35c4074900017f8c8e1a4935054d0;hp=b10ac5bb3c0a13d3766cda669c661a9019704d4e;hpb=3233c81f3ee11b7991381e0fe661426ff1355629;p=libfirm diff --git a/ir/ana/irdom.c b/ir/ana/irdom.c index b10ac5bb3..a878a410b 100644 --- a/ir/ana/irdom.c +++ b/ir/ana/irdom.c @@ -40,7 +40,7 @@ #include "irgraph_t.h" /* To access state field. */ #include "irnode_t.h" #include "ircons_t.h" -#include "array.h" +#include "array_t.h" #include "iredges.h" @@ -637,13 +637,12 @@ static int init_construction(ir_graph *irg, irg_walk_func *pre) { ir_node *pred = get_End_keepalive(end, i); if (is_Block(pred)) { - if (Block_not_block_visited(pred)) { - /* we found a endless loop */ - dec_irg_block_visited(irg); - irg_block_walk(pred, pre, NULL, &n_blocks); - } - else + if (Block_block_visited(pred)) continue; + + /* we found an endless loop */ + dec_irg_block_visited(irg); + irg_block_walk(pred, pre, NULL, &n_blocks); } in[j++] = pred; } @@ -677,7 +676,7 @@ void compute_doms(ir_graph *irg) { n_blocks = init_construction(irg, count_and_init_blocks_dom); /* Memory for temporary information. */ - tdi_list = xcalloc(n_blocks, sizeof(tdi_list[0])); + tdi_list = XMALLOCNZ(tmp_dom_info, n_blocks); /* We need the out data structure. */ assure_irg_outs(irg); @@ -816,7 +815,7 @@ void compute_postdoms(ir_graph *irg) { n_blocks = init_construction(irg, count_and_init_blocks_pdom); /* Memory for temporary information. */ - tdi_list = xcalloc(n_blocks, sizeof(tdi_list[0])); + tdi_list = XMALLOCNZ(tmp_dom_info, n_blocks); /* We need the out data structure. */ assure_irg_outs(irg);