+/** Returns the amount of out edges for not yet visited successors.
+ * This version handles some special nodes like irg_frame, irg_args etc.
+ */
+static int count_outs(ir_graph *irg) {
+ ir_node *n;
+ int res;
+
+ inc_irg_visited(irg);
+ res = _count_outs(get_irg_end(irg));
+
+ /* now handle special nodes */
+ n = get_irg_frame(irg);
+ if (irn_not_visited(n)) {
+ n->out = (ir_node **)1;
+ ++res;
+ }
+
+ n = get_irg_args(irg);
+ if (irn_not_visited(n)) {
+ n->out = (ir_node **)1;
+ ++res;
+ }
+
+ return res;
+}
+
+/**
+ * Enter memory for the outs to a node.
+ *
+ * @param n current node
+ * @param free current free address in the chunk allocated for the outs
+ *
+ * @return The next free address
+ */
+static ir_node **_set_out_edges(ir_node *n, ir_node **free) {
+ int n_outs, start, i, irn_arity;
+ ir_node *pred;
+
+ set_irn_visited(n, get_irg_visited(current_ir_graph));