The only user of this information (bechordal) can just check the register requirement type.
for (int i = insn->use_start; i < insn->n_ops; ++i) {
be_operand_t *op = &insn->ops[i];
ir_node *proj = op->carrier;
for (int i = insn->use_start; i < insn->n_ops; ++i) {
be_operand_t *op = &insn->ops[i];
ir_node *proj = op->carrier;
- /*
- * Note that the predecessor must not be a Proj of the Perm,
- * since ignore-nodes are not Perm'ed.
- */
- if (op->has_constraints && is_Proj(proj) && get_Proj_pred(proj) == perm) {
+ /* Note that the predecessor is not necessarily a Proj of the Perm,
+ * since ignore-nodes are not Perm'ed. */
+ /* FIXME: Only setting the constraints, when the register requirement is
+ * limited, is a hack. It will break when multiple differently constrained
+ * inputs use the same value. */
+ if (arch_register_req_is(op->req, limited) && is_Proj(proj) && get_Proj_pred(proj) == perm) {
be_set_constr_out(perm, get_Proj_proj(proj), op->req);
}
}
be_set_constr_out(perm, get_Proj_proj(proj), op->req);
}
}
o.irn = irn;
o.pos = -(get_Proj_proj(p) + 1);
o.partner = NULL;
o.irn = irn;
o.pos = -(get_Proj_proj(p) + 1);
o.partner = NULL;
- o.has_constraints = arch_register_req_is(o.req, limited) | (o.req->width > 1);
obstack_grow(obst, &o, sizeof(o));
insn->n_ops++;
obstack_grow(obst, &o, sizeof(o));
insn->n_ops++;
- insn->has_constraints |= o.has_constraints;
+ insn->has_constraints |= arch_register_req_is(o.req, limited) | (o.req->width > 1);
}
}
} else if (arch_irn_consider_in_reg_alloc(env->cls, irn)) {
}
}
} else if (arch_irn_consider_in_reg_alloc(env->cls, irn)) {
o.irn = irn;
o.pos = -1;
o.partner = NULL;
o.irn = irn;
o.pos = -1;
o.partner = NULL;
- o.has_constraints = arch_register_req_is(o.req, limited) | (o.req->width > 1);
obstack_grow(obst, &o, sizeof(o));
insn->n_ops++;
obstack_grow(obst, &o, sizeof(o));
insn->n_ops++;
- insn->has_constraints |= o.has_constraints;
+ insn->has_constraints |= arch_register_req_is(o.req, limited) | (o.req->width > 1);
}
insn->use_start = insn->n_ops;
}
insn->use_start = insn->n_ops;
o.irn = irn;
o.pos = i;
o.partner = NULL;
o.irn = irn;
o.pos = i;
o.partner = NULL;
- o.has_constraints = arch_register_req_is(o.req, limited);
obstack_grow(obst, &o, sizeof(o));
insn->n_ops++;
obstack_grow(obst, &o, sizeof(o));
insn->n_ops++;
- insn->has_constraints |= o.has_constraints;
+ insn->has_constraints |= arch_register_req_is(o.req, limited);
const bitset_t *regs; /**< admissible register bitset */
int pos; /**< pos of the operand (0 to n are inputs, -1 to -n are outputs) */
const arch_register_req_t *req; /**< register constraints for the carrier node */
const bitset_t *regs; /**< admissible register bitset */
int pos; /**< pos of the operand (0 to n are inputs, -1 to -n are outputs) */
const arch_register_req_t *req; /**< register constraints for the carrier node */
- unsigned has_constraints : 1; /**< the carrier node has register constraints (the constraint type is limited) */