bool spilled; /**< value was already spilled on this path */
} loc_t;
-typedef struct _workset_t {
+typedef struct workset_t {
unsigned len; /**< current length */
loc_t vals[0]; /**< array of the values/distances in this working set */
} workset_t;
static int loc_compare(const void *a, const void *b)
{
- const loc_t *p = a;
- const loc_t *q = b;
+ const loc_t *p = (const loc_t*)a;
+ const loc_t *q = (const loc_t*)b;
return p->time - q->time;
}
* @p v A variable to put the current value in
* @p i An integer for internal use
*/
-#define workset_foreach(ws, v, i) \
+#define workset_foreach(ws, v, i) \
for (i=0; v=(i < ws->len) ? ws->vals[i].node : NULL, i < ws->len; ++i)
-typedef struct _block_info_t
-{
+typedef struct block_info_t {
workset_t *start_workset;
workset_t *end_workset;
} block_info_t;
static inline block_info_t *get_block_info(const ir_node *block)
{
- return get_irn_link(block);
+ return (block_info_t*)get_irn_link(block);
}
static inline void set_block_info(ir_node *block, block_info_t *info)
unsigned i;
int in;
unsigned ws_count;
- int free_slots, free_pressure_slots;
+ int free_slots, free_pressure_slots;
unsigned pressure;
int arity;
workset_t **pred_worksets;
obstack_init(&obst);
cls = rcls;
lv = be_get_irg_liveness(irg);
- n_regs = cls->n_regs - be_put_ignore_regs(irg, cls, NULL);
+ n_regs = be_get_n_allocatable_regs(irg, cls);
ws = new_workset();
uses = be_begin_uses(irg, lv);
loop_ana = be_new_loop_pressure(irg, cls);