Ignore Block->Block out edges when iterating over all out edges of a Block.
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Fri, 28 Dec 2007 17:02:55 +0000 (17:02 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Fri, 28 Dec 2007 17:02:55 +0000 (17:02 +0000)
These should be MacroBlock edges and can be safely ignored.

[r17078]

ir/be/belistsched.c
ir/be/beschedtrace.c

index 09ea4e1..9499dd8 100644 (file)
@@ -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 */
index 55a47ad..9f3822d 100644 (file)
@@ -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);