X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Firdom.c;h=ff572d8de4e40c5ebe8045d8baa87db802545de9;hb=e98f2bd09ccc403c64e3ebe30f3b0183760bccc6;hp=c44f751b03f70cb74f9caa2317ed6923f07f1a22;hpb=0e975a6e5046ba66cf78d946bd924efe3876f95c;p=libfirm diff --git a/ir/ana/irdom.c b/ir/ana/irdom.c index c44f751b0..ff572d8de 100644 --- a/ir/ana/irdom.c +++ b/ir/ana/irdom.c @@ -52,7 +52,8 @@ ir_node *get_Block_idom(const ir_node *bl) assert(is_Block(bl)); if (get_Block_dom_depth(bl) == -1) { /* This block is not reachable from Start */ - return new_Bad(); + ir_graph *irg = get_irn_irg(bl); + return new_r_Bad(irg); } return get_dom_info(bl)->idom; } @@ -83,7 +84,8 @@ ir_node *get_Block_ipostdom(const ir_node *bl) assert(is_Block(bl)); if (get_Block_postdom_depth(bl) == -1) { /* This block is not reachable from Start */ - return new_Bad(); + ir_graph *irg = get_irn_irg(bl); + return new_r_Bad(irg); } return get_pdom_info(bl)->idom; } @@ -408,7 +410,7 @@ void postdom_tree_walk_irg(ir_graph *irg, irg_walk_func *pre, static void assign_tree_dom_pre_order(ir_node *bl, void *data) { - unsigned *num = data; + unsigned *num = (unsigned*) data; ir_dom_info *bi = get_dom_info(bl); bi->tree_pre_num = (*num)++; @@ -434,7 +436,7 @@ static void assign_tree_dom_pre_order_max(ir_node *bl, void *data) static void assign_tree_postdom_pre_order(ir_node *bl, void *data) { - unsigned *num = data; + unsigned *num = (unsigned*) data; ir_dom_info *bi = get_pdom_info(bl); bi->tree_pre_num = (*num)++; @@ -698,7 +700,7 @@ void compute_doms(ir_graph *irg) tmp_dom_info *u; if (is_Bad(pred) || (get_Block_dom_pre_num (pred) == -1)) - continue; /* control-dead */ + continue; /* control-dead */ u = dom_eval (&tdi_list[get_Block_dom_pre_num(pred)]); if (u->semi < w->semi) w->semi = u->semi; @@ -713,8 +715,8 @@ void compute_doms(ir_graph *irg) ir_node *pred = get_irn_n(end, j); tmp_dom_info *u; - if (is_no_Block(pred) || get_Block_dom_pre_num(pred) == -1) - continue; /* control-dead */ + if (!is_Block(pred) || get_Block_dom_pre_num(pred) == -1) + continue; /* control-dead */ u = dom_eval (&tdi_list[get_Block_dom_pre_num(pred)]); if (u->semi < w->semi) w->semi = u->semi; @@ -840,7 +842,7 @@ void compute_postdoms(ir_graph *irg) tmp_dom_info *u; if (get_Block_postdom_pre_num (succ) == -1) - continue; /* endless-loop */ + continue; /* endless-loop */ u = dom_eval (&tdi_list[get_Block_postdom_pre_num(succ)]); if (u->semi < w->semi) w->semi = u->semi;