X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Firscc.c;h=82cb67e5d07002ecaf90ec65c44146eb33a75e3a;hb=8b7bdd153f28405649d77f589d0710f88d683d68;hp=13c1d7c214e10ebb0678318df9c465a8a7c858e1;hpb=7ef5abc25f375591792e271084aaf26237dfaa25;p=libfirm diff --git a/ir/ana/irscc.c b/ir/ana/irscc.c index 13c1d7c21..82cb67e5d 100644 --- a/ir/ana/irscc.c +++ b/ir/ana/irscc.c @@ -619,8 +619,10 @@ static ir_node *find_tail(ir_node *n) /* It's a completely bad loop: without Phi/Block nodes that can be a head. I.e., the code is "dying". We break the loop by setting Bad nodes. */ - int arity = get_irn_arity(n); - ir_node *bad = get_irg_bad(get_irn_irg(n)); + ir_graph *irg = get_irn_irg(n); + ir_mode *mode = get_irn_mode(n); + ir_node *bad = new_r_Bad(irg, mode); + int arity = get_irn_arity(n); for (i = -1; i < arity; ++i) { set_irn_n(n, i, bad); } @@ -774,7 +776,7 @@ int construct_backedges(ir_graph *irg) assert(head_rem == current_loop); mature_loops(current_loop, irg->obst); set_irg_loop(irg, current_loop); - set_irg_loopinfo_state(irg, loopinfo_consistent); + set_irg_state(irg, IR_GRAPH_STATE_CONSISTENT_LOOPINFO); assert(get_irg_loop(irg)->kind == k_ir_loop); current_ir_graph = rem; return max_loop_depth; @@ -818,7 +820,7 @@ void free_loop_information(ir_graph *irg) */ irg_walk_graph(irg, loop_reset_node, NULL, NULL); set_irg_loop(irg, NULL); - set_irg_loopinfo_state(current_ir_graph, loopinfo_none); + clear_irg_state(current_ir_graph, IR_GRAPH_STATE_CONSISTENT_LOOPINFO); /* We cannot free the loop nodes, they are on the obstack. */ }