summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bechordal_common.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2012-11-25 12:14:53 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2012-11-25 12:14:53 +0100
commit884eb109498da4ec48fb64bd4a2d86f8d1001147 (patch)
tree780b885fe75d1976fb5765af212df3b7ff7a2009 /ir/be/bechordal_common.c
parent929bd10ba046d7482e572d97ec592a4055c65970 (diff)
beinsn: Do not store, whether insn operands are constrained.
The only user of this information (bechordal) can just check the register requirement type.
Diffstat (limited to 'ir/be/bechordal_common.c')
-rw-r--r--ir/be/bechordal_common.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/ir/be/bechordal_common.c b/ir/be/bechordal_common.c
index 8049f05..914a228 100644
--- a/ir/be/bechordal_common.c
+++ b/ir/be/bechordal_common.c
@@ -238,11 +238,12 @@ ir_node *pre_process_constraints(be_chordal_env_t *env, be_insn_t **the_insn)
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);
}
}