From: Michael Beck Date: Fri, 28 Dec 2007 17:02:55 +0000 (+0000) Subject: Ignore Block->Block out edges when iterating over all out edges of a Block. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=50b276960fe3b12d5976b03db2fa99afe2537928;p=libfirm Ignore Block->Block out edges when iterating over all out edges of a Block. These should be MacroBlock edges and can be safely ignored. [r17078] --- diff --git a/ir/be/belistsched.c b/ir/be/belistsched.c index 09ea4e1ed..9499dd8e8 100644 --- a/ir/be/belistsched.c +++ b/ir/be/belistsched.c @@ -452,12 +452,19 @@ static void list_sched_block(ir_node *block, void *env_ptr) /* Then one can add all nodes are ready to the set. */ foreach_out_edge(block, edge) { - ir_node *irn = get_edge_src_irn(edge); + ir_node *irn = get_edge_src_irn(edge); + ir_opcode code = get_irn_opcode(irn); int users; - /* Skip the end node because of keepalive edges. */ - if (get_irn_opcode(irn) == iro_End) + if (code == iro_End) { + /* Skip the end node because of keep-alive edges. */ continue; + } else if (code == iro_Block) { + /* A Block-Block edge. This should be the MacroBlock + * edge, ignore it. */ + assert(get_Block_MacroBlock(irn) == block && "Block-Block edge found"); + continue; + } users = get_irn_n_edges(irn); if (users == 0) @@ -485,7 +492,7 @@ static void list_sched_block(ir_node *block, void *env_ptr) } else { /* Other nodes must have all operands in other blocks to be made - * ready */ + * ready */ int ready = 1; /* Check, if the operands of a node are not local to this block */ diff --git a/ir/be/beschedtrace.c b/ir/be/beschedtrace.c index 55a47ad59..9f3822dfe 100644 --- a/ir/be/beschedtrace.c +++ b/ir/be/beschedtrace.c @@ -394,8 +394,16 @@ static void trace_preprocess_block(trace_env_t *env, ir_node *block) { foreach_out_edge(block, edge) { ir_node *succ = get_edge_src_irn(edge); - if (is_Anchor(succ)) + if (is_Block(succ)) { + /* A Block-Block edge. This should be the MacroBlock + * edge, ignore it. */ + assert(get_Block_MacroBlock(succ) == block && "Block-Block edge found"); continue; + } + if (is_Anchor(succ)) { + /* ignore a keep alive edge */ + continue; + } if (is_root(succ, block)) { mark_root_node(env, succ); set_irn_link(succ, root);