be_insn_t *insn = OALLOCZ(obst, be_insn_t);
+ bool has_constraints = false;
+
insn->irn = irn;
if (get_irn_mode(irn) == mode_T) {
ir_node *p;
/* found a def: create a new operand */
o.req = arch_get_irn_register_req(p);
o.carrier = p;
- o.irn = irn;
- o.pos = -(get_Proj_proj(p) + 1);
o.partner = NULL;
obstack_grow(obst, &o, sizeof(o));
insn->n_ops++;
- insn->has_constraints |= arch_register_req_is(o.req, limited) | (o.req->width > 1);
+ has_constraints |= arch_register_req_is(o.req, limited) | (o.req->width > 1);
}
}
} else if (arch_irn_consider_in_reg_alloc(env->cls, irn)) {
/* only one def, create one operand */
o.req = arch_get_irn_register_req(irn);
o.carrier = irn;
- o.irn = irn;
- o.pos = -1;
o.partner = NULL;
obstack_grow(obst, &o, sizeof(o));
insn->n_ops++;
- insn->has_constraints |= arch_register_req_is(o.req, limited) | (o.req->width > 1);
+ has_constraints |= arch_register_req_is(o.req, limited) | (o.req->width > 1);
}
insn->use_start = insn->n_ops;
/* found a register use, create an operand */
o.req = arch_get_irn_register_req_in(irn, i);
o.carrier = op;
- o.irn = irn;
- o.pos = i;
o.partner = NULL;
obstack_grow(obst, &o, sizeof(o));
insn->n_ops++;
- insn->has_constraints |= arch_register_req_is(o.req, limited);
+ has_constraints |= arch_register_req_is(o.req, limited);
}
}
+ if (!has_constraints)
+ return NULL;
+
insn->ops = (be_operand_t*)obstack_finish(obst);
/* Compute the admissible registers bitsets. */