+ /* if node is a phi of the current block we reload
+ * the corresponding argument, else node itself */
+ if (is_Phi(node) && get_nodes_block(node) == block) {
+ node = get_irn_n(node, i);
+ assert(!l->spilled);
+
+ /* we might have unknowns as argument for the phi */
+ if (!arch_irn_consider_in_reg_alloc(arch_env, cls, node))
+ continue;
+ }
+
+ /* check if node is in a register at end of pred */
+ pred_loc = workset_contains(pred_end_workset, node);
+ if (pred_loc != NULL) {
+ /* we might have to spill value on this path */
+ if (move_spills && !pred_loc->spilled && l->spilled) {
+ ir_node *insert_point
+ = be_get_end_of_block_insertion_point(pred);
+ insert_point = sched_prev(insert_point);
+ DB((dbg, DBG_SPILL, "Spill %+F after %+F\n", node,
+ insert_point));
+ be_add_spill(senv, node, insert_point);
+ }
+ } else {
+ /* node is not in register at the end of pred -> reload it */
+ DB((dbg, DBG_FIX, " reload %+F\n", node));
+ DB((dbg, DBG_SPILL, "Reload %+F before %+F,%d\n", node, block, i));
+ be_add_reload_on_edge(senv, node, block, i, cls, 1);
+ }