dominator tree of all nodes'
blocks depending on us; our final
placement has to dominate DCA. */
- for (i = 0; i < get_irn_n_outs(n); ++i) {
+ for (i = get_irn_n_outs(n) - 1; i >= 0; --i) {
ir_node *out = get_irn_out(n, i);
+ if (get_irn_op(out) == op_End) {
+ /*
+ * This consumer is the End node, a keep alive edge.
+ * This is not a real consumer, so we ignore it
+ */
+ continue;
+ }
+
/* ignore if out is in dead code */
- ir_node *outbl = get_nodes_block(out);
+ ir_node *outbl = get_irn_n(out, -1);
if (is_Block_unreachable(outbl))
continue;
dca = consumer_dom_dca(dca, out, n);
}
if (dca) {
set_nodes_block(n, dca);
-
move_out_of_loops (n, early);
}
/* else all outs are in dead code */