-static block_info_t *compute_block_start_info(ir_node *blk, void *data) {
- belady_env_t *env = data;
- ir_node *irn, *first;
- irn_live_t *li;
- int i, count, ws_count;
- loc_t loc, *starters;
- ir_graph *irg = get_irn_irg(blk);
- struct obstack ob;
- block_info_t *res = get_block_info(blk);
-
- /* Have we seen this block before? */
- if (res)
- return res;
-
- /* Create the block info for this block. */
- res = new_block_info(&env->ob);
- set_block_info(blk, res);
-
-
- /* Get all values living at the block start sorted by next use*/
- obstack_init(&ob);
-
- DBG((dbg, DBG_START, "Living at start of %+F:\n", blk));
- first = sched_first(blk);
- count = 0;
- sched_foreach(blk, irn) {
- if (is_Phi(irn) && arch_get_irn_reg_class(env->arch, irn, -1) == env->cls) {
- loc.irn = irn;
- loc.time = get_distance(env, first, 0, irn, 0);
- obstack_grow(&ob, &loc, sizeof(loc));
- DBG((dbg, DBG_START, " %+F:\n", irn));
- count++;
- } else
+static void compute_live_ins(const ir_node *block)
+{
+ ir_loop *loop = get_irn_loop(block);
+ ir_node *first;
+ ir_node *node;
+ loc_t loc;
+ loc_t *starters;
+ loc_t *delayed;
+ int i, len, ws_count;
+ int free_slots, free_pressure_slots;
+ unsigned pressure;
+ //int arity;
+ //int n_pred_worksets;
+ //workset_t **pred_worksets;
+
+ /* Collect all values living at start of block */
+ starters = NEW_ARR_F(loc_t, 0);
+ delayed = NEW_ARR_F(loc_t, 0);
+
+ DB((dbg, DBG_START, "Living at start of %+F:\n", block));
+ first = sched_first(block);
+
+ /* check all Phis first */
+ sched_foreach(block, node) {
+ if (! is_Phi(node))