-/**
- * Collects all values live-in at block @p block and all phi results in this block.
- * Then it adds the best values (at most n_regs) to the blocks start_workset.
- * The phis among the remaining values get spilled: Introduce psudo-copies of
- * their args to break interference and make it possible to spill them to the
- * same spill slot.
- */
-static block_info_t *compute_block_start_info(belady_env_t *env, ir_node *block) {
- ir_node *pred_block;
- block_info_t *res, *pred_info;
-
- /* Have we seen this block before? */
- res = get_block_info(block);
- if (res)
- return res;
-
- /* Create the block info for this block. */
- res = new_block_info(&env->ob);
- set_block_info(block, res);
-
- /* Use endset of predecessor block as startset */
- assert(get_Block_n_cfgpreds(block) == 1 && block != get_irg_start_block(get_irn_irg(block)));
- pred_block = get_Block_cfgpred_block(block, 0);
- pred_info = get_block_info(pred_block);
-
- /* if pred block has not been processed yet, do it now */
- if (pred_info == NULL || pred_info->processed == 0) {
- belady(pred_block, env);
- pred_info = get_block_info(pred_block);
+#if 0
+ /* determine reloaded status of the values: If there's 1 pred block (which
+ * is no backedge) where the value is reloaded then we must set it to
+ * reloaded here. We place spills in all pred where the value was not yet
+ * reloaded to be sure we have a spill on each path */
+ n_pred_worksets = 0;
+ arity = get_irn_arity(block);
+ pred_worksets = alloca(sizeof(pred_worksets[0]) * arity);
+ for(i = 0; i < arity; ++i) {
+ ir_node *pred_block = get_Block_cfgpred_block(block, i);
+ block_info_t *pred_info = get_block_info(pred_block);
+ if(pred_info == NULL)
+ continue;
+
+ pred_worksets[n_pred_worksets] = pred_info->end_workset;
+ ++n_pred_worksets;