+void assure_constraints(be_irg_t *birg) {
+ constraint_env_t cenv;
+ op_copy_assoc_t *entry;
+ dom_front_info_t *dom;
+ ir_node **nodes;
+ FIRM_DBG_REGISTER(firm_dbg_module_t *mod, "firm.be.lower");
+
+ cenv.birg = birg;
+ cenv.op_set = new_pset(cmp_op_copy_assoc, 16);
+ obstack_init(&cenv.obst);
+
+ irg_walk_blkwise_graph(birg->irg, NULL, assure_constraints_walker, &cenv);
+
+ /* introduce copies needs dominance information */
+ dom = be_compute_dominance_frontiers(birg->irg);
+
+ /* for all */
+ foreach_pset(cenv.op_set, entry) {
+ int n;
+ ir_node *cp;
+
+ n = pset_count(entry->copies);
+ nodes = alloca((n + 1) * sizeof(nodes[0]));
+
+ /* put the node in an array */
+ n = 0;
+ nodes[n++] = entry->op;
+ DBG((mod, LEVEL_1, "introduce copies for %+F ", entry->op));
+
+ /* collect all copies */
+ foreach_pset(entry->copies, cp) {
+ nodes[n++] = cp;
+ DB((mod, LEVEL_1, ", %+F ", cp));
+ }