- /*
- * If we inserted a perm,
- * we have to recompute liveness analysis since inserting
- * a Perm changes the liveness situation at the end
- * of the block.
- * (its needed by successive calls to insert_Perm_after)
- * Perhaps thinking about an online liveness analysis
- * would help.
- */
- if(perm)
- be_liveness(get_irn_irg(bl));
+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);
+ }
+
+ else
+ check_constraints(cenv, irn, irn, &perm);