-#if 0
-static void create_register_perms(const arch_isa_t *isa, ir_graph *irg, ir_node *bl, pmap *regs)
-{
- int i, j, n;
- struct obstack obst;
-
- obstack_init(&obst);
-
- /* Create a Perm after the RegParams node to delimit it. */
- for(i = 0, n = arch_isa_get_n_reg_class(isa); i < n; ++i) {
- const arch_register_class_t *cls = arch_isa_get_reg_class(isa, i);
- ir_node *perm;
- ir_node **in;
- int n_regs;
-
- for(n_regs = 0, j = 0; j < cls->n_regs; ++j) {
- const arch_register_t *reg = &cls->regs[j];
- ir_node *irn = pmap_get(regs, (void *) reg);
-
- if(irn && !arch_register_type_is(reg, ignore)) {
- n_regs++;
- obstack_ptr_grow(&obst, irn);
- set_irn_link(irn, (void *) reg);
- }
- }
-
- obstack_ptr_grow(&obst, NULL);
- in = obstack_finish(&obst);
- if(n_regs > 0) {
- perm = be_new_Perm(cls, irg, bl, n_regs, in);
- for(j = 0; j < n_regs; ++j) {
- ir_node *arg = in[j];
- arch_register_t *reg = get_irn_link(arg);
- pmap_insert(regs, reg, arg);
- be_set_constr_single_reg(perm, BE_OUT_POS(j), reg);
- }
- }
- obstack_free(&obst, in);
- }
-
- obstack_free(&obst, NULL);
-}
-#endif
-