+ loc = to_take_or_not_to_take(env, first, irn, block, loop);
+
+ if (! USES_IS_INFINITE(loc.time)) {
+ if (USES_IS_PENDING(loc.time))
+ ARR_APP1(loc_t, delayed, loc);
+ else
+ ARR_APP1(loc_t, starters, loc);
+ }
+ }
+
+ /* check all Live-Ins */
+ be_lv_foreach(lv, block, be_lv_state_in, i) {
+ ir_node *node = be_lv_get_irn(lv, block, i);
+
+ loc = to_take_or_not_to_take(env, first, node, block, loop);
+
+ if (! USES_IS_INFINITE(loc.time)) {
+ if (USES_IS_PENDING(loc.time))
+ ARR_APP1(loc_t, delayed, loc);
+ else
+ ARR_APP1(loc_t, starters, loc);
+ }
+ }
+
+ pressure = be_get_loop_pressure(env->loop_ana, env->cls, loop);
+ assert(ARR_LEN(delayed) <= (signed)pressure);
+ free_slots = env->n_regs - ARR_LEN(starters);
+ free_pressure_slots = env->n_regs - (pressure - ARR_LEN(delayed));
+ free_slots = MIN(free_slots, free_pressure_slots);
+ /* append nodes delayed due to loop structure until start set is full */
+ for (i = 0; i < ARR_LEN(delayed) && i < free_slots; ++i) {
+ DBG((dbg, DBG_START, " delayed %+F taken\n", delayed[i].irn));
+ ARR_APP1(loc_t, starters, delayed[i]);
+ delayed[i].irn = NULL;
+ }
+
+ /* spill all delayed phis which didn't make it into start workset */
+ for (i = ARR_LEN(delayed) - 1; i >= 0; --i) {
+ ir_node *irn = delayed[i].irn;
+ if (irn && is_Phi(irn)) {
+ DBG((dbg, DBG_START, " spilling delayed phi %+F\n", irn));
+ be_spill_phi(env->senv, irn);
+ }