- Perms inserted before the constraint handling phase are considered to be
- correctly precolored. These Perms arise during the ABI handling phase.
- */
- if(insn->has_constraints && !be_is_Perm(irn)) {
- firm_dbg_module_t *dbg = firm_dbg_register("firm.be.chordal.constr");
- const arch_env_t *aenv = env->birg->main_env->arch_env;
- int n_regs = env->cls->n_regs;
- bitset_t *bs = bitset_alloca(n_regs);
- bitset_t *non_ignore = bitset_alloca(n_regs);
- ir_node **alloc_nodes = alloca(n_regs * sizeof(alloc_nodes[0]));
- bipartite_t *bp = bipartite_new(n_regs, n_regs);
- int *assignment = alloca(n_regs * sizeof(assignment[0]));
- pmap *partners = pmap_create();
-
- int i, n_alloc;
- long col;
- const ir_edge_t *edge;
- ir_node *perm = insert_Perm_after(aenv, env->cls, env->dom_front, sched_prev(irn));
-
- arch_put_non_ignore_regs(aenv, env->cls, non_ignore);
-
- /* Registers are propagated by insert_Perm_after(). Clean them here! */
- if(perm) {
- foreach_out_edge(perm, edge) {
- ir_node *proj = get_edge_src_irn(edge);
- arch_set_irn_register(aenv, proj, NULL);
- }
- }
+ * If the current node is a barrier toggle the silent flag.
+ * If we are in the start block, we are ought to be silent at the beginning,
+ * so the toggling activates the constraint handling but skips the barrier.
+ * If we are in the end block we handle the in requirements of the barrier
+ * and set the rest to silent.
+ */
+ if (be_is_Barrier(irn))
+ *silent = !*silent;