loc.node = node;
loc.spilled = false;
- if (!arch_irn_consider_in_reg_alloc(cls, node)) {
- loc.time = USES_INFINITY;
- return loc;
- }
-
/* We have to keep nonspillable nodes in the workingset */
if (arch_get_irn_flags(skip_Proj_const(node)) & arch_irn_flags_dont_spill) {
loc.time = 0;
new_vals = new_workset();
sched_foreach(block, irn) {
- int i, arity;
assert(workset_get_length(ws) <= n_regs);
/* Phis are no real instr (see insert_starters()) */
/* allocate all values _used_ by this instruction */
workset_clear(new_vals);
- for (i = 0, arity = get_irn_arity(irn); i < arity; ++i) {
- ir_node *in = get_irn_n(irn, i);
- if (!arch_irn_consider_in_reg_alloc(cls, in))
- continue;
-
+ be_foreach_use(irn, cls, in_req_, in, in_req,
/* (note that "spilled" is irrelevant here) */
workset_insert(new_vals, in, false);
- }
+ );
displace(new_vals, 1);
/* allocate all values _defined_ by this instruction */
workset_clear(new_vals);
- be_foreach_definition(irn, cls, value,
- assert(req_->width == 1);
+ be_foreach_definition(irn, cls, value, req,
+ assert(req->width == 1);
workset_insert(new_vals, value, false);
);
displace(new_vals, 0);