+ unsigned available;
+
+ if (all_preds_known) {
+ available = available_in_all_preds(pred_worksets, arity, node, false);
+ } else {
+ available = AVAILABLE_UNKNOWN;
+ }
+
+ loc = to_take_or_not_to_take(first, node, loop, available);
+
+ 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(loop_ana, cls, loop);
+ assert(ARR_LEN(delayed) <= (signed)pressure);
+ free_slots = n_regs - ARR_LEN(starters);
+ free_pressure_slots = n_regs - (pressure - ARR_LEN(delayed));
+ free_slots = MIN(free_slots, free_pressure_slots);
+
+ /* so far we only put nodes into the starters list that are used inside
+ * the loop. If register pressure in the loop is low then we can take some
+ * values and let them live through the loop */
+ DB((dbg, DBG_START, "Loop pressure %d, taking %d delayed vals\n",
+ pressure, free_slots));
+ if (free_slots > 0) {
+ qsort(delayed, ARR_LEN(delayed), sizeof(delayed[0]), loc_compare);
+
+ for (i = 0; i < ARR_LEN(delayed) && free_slots > 0; ++i) {
+ int p, arity;
+ loc_t *loc = & delayed[i];
+
+ /* don't use values which are dead in a known predecessors
+ * to not induce unnecessary reloads */
+ arity = get_irn_arity(block);
+ for (p = 0; p < arity; ++p) {
+ ir_node *pred_block = get_Block_cfgpred_block(block, p);
+ block_info_t *pred_info = get_block_info(pred_block);
+
+ if (pred_info == NULL)
+ continue;