+ DBG((dbgphi, 1, "\tBest color: none\n"));
+ }
+}
+
+/**
+ * Tries to re-allocate colors of nodes in this phi unit, to achieve a lower
+ * number of copy instructions placed during phi destruction.
+ * General purpose version.
+ */
+static void pu_coalesce_n_phi(phi_unit_t *pu) {
+ DBG((dbgphi, 1, "\n"));
+ /* TODO */
+}
+
+/**
+ * Prepares a phi class for further processing as a phi unit.
+ * @param pc The phi class to prepare.
+ * @return A so called phi unit containing some prepared informations
+ * needed by the following coalescing phase.
+ */
+static phi_unit_t *new_pu(pset *pc) {
+ phi_unit_t *pu;
+ ir_node *n, *phi = NULL;
+
+ /* get the phi count of this class */
+ pu = calloc(1, sizeof(*pu));
+ for (n = pset_first(pc); n; n = pset_next(pc))
+ if (is_Phi(n)) {
+ phi = n;
+ pu->phi_count++;
+ }
+
+ if (pu->phi_count == 1) {
+ ir_node **tmp;
+ int i, o;
+ struct obstack ob;
+
+ obstack_init(&ob);
+
+ /* build member set not containing phi interferers */
+ DBG((dbgphi, 1, "Phi-1 class:\n"));
+ pu->node_count = 1; /*for the phi*/
+ for (n = pset_first(pc); n; n = pset_next(pc)) {
+ if (is_Phi(n))
+ continue;
+ if (!phi_ops_interfere(phi, n)) {
+ DBG((dbgphi, 1, "\tAdding to members: %n\n", n));
+ obstack_ptr_grow(&ob, n);
+ pu->node_count++;
+ } else {
+ DBG((dbgphi, 1, "\tPhi interferer: %n\n", n));
+ pset_insert_ptr(free_nodes, n);
+ }
+ }
+ tmp = obstack_finish(&ob);
+ pu->nodes = malloc(pu->node_count * sizeof(*pu->nodes));
+ pu->nodes[0] = phi;
+ memcpy(&pu->nodes[1], tmp, (pu->node_count-1) * sizeof(*tmp));
+
+ /* init conlict graph to life range interference */
+ for (i = 0; i < pu->node_count; ++i)
+ for (o = i+1; o < pu->node_count; ++o)
+ if (phi_ops_interfere(pu->nodes[i], pu->nodes[o]))
+ pu_add_conflict(pu, pu->nodes[i], pu->nodes[o]);
+ pu->conflict_count_org = pu->conflict_count;
+
+ pu->changed_nodes = new_set(set_cmp_node_stat_t, INITIAL_SLOTS_CHANGED_NODES);