+ if(pset_find_ptr(phi_blocks, curr_bl)) {
+ ir_node *phi = get_irn_link(curr_bl);
+
+ if(!phi) {
+ int i, n_preds = get_irn_arity(curr_bl);
+ ir_graph *irg = get_irn_irg(curr_bl);
+ ir_node **ins = malloc(n_preds * sizeof(ins[0]));
+
+ for(i = 0; i < n_preds; ++i)
+ ins[i] = new_r_Unknown(irg, mode);
+
+ phi = new_r_Phi(irg, curr_bl, n_preds, ins, mode);
+ DBG((dbg, LEVEL_2, "\tcreating phi %+F in %+F\n", phi, curr_bl));
+
+ set_irn_link(curr_bl, phi);
+ sched_add_after(curr_bl, phi);
+ free(ins);
+
+ for(i = 0; i < n_preds; ++i) {
+ ir_node *arg = search_def(phi, i, copies, copy_blocks, phi_blocks, mode);
+ DBG((dbg, LEVEL_2, "\t\t%+F(%d) -> %+F\n", phi, i, arg));
+ set_irn_n(phi, i, arg);
+ }
+ }
+
+ return phi;
+ }
+