+
+ /*
+ * Turn an input constraint into an output constraint:
+ * The Proj of the Perm which corresponds to the input
+ * constraint will have the input constraint of the node
+ * as an output constraint
+ */
+ if(pos >= 0) {
+ ir_node *op = get_irn_n(irn, pos);
+
+ /*
+ * The operand must be a proj now, since a perm cut
+ * all live ranges.
+ */
+ assert(is_Proj(op));
+ be_set_Perm_out_req(*perm, get_Proj_proj(op), &req);
+ }
+ }
+ }
+}
+
+static void walker_insert_constr_perms(ir_node *bl, void *env) {
+ be_chordal_env_t *cenv = env;
+ ir_node *irn;
+
+ for(irn = sched_first(bl); !sched_is_end(irn); irn = sched_next(irn)) {
+ ir_node *perm = NULL;
+
+ if(get_irn_mode(irn) == mode_T) {
+ ir_node *proj;
+
+ for(proj = sched_next(irn); is_Proj(proj); proj = sched_next(proj))
+ check_constraints(cenv, irn, proj, &perm);
+
+ irn = sched_prev(proj);