- const arch_env_t *arch_env = env->main_env->arch_env;
- ir_node *bl = is_Block(pos) ? pos : get_nodes_block(pos);
- ir_graph *irg = get_irn_irg(bl);
- pset *live = put_live_end(bl, pset_new_ptr_default());
+ be_node_attr_t *attr = (be_node_attr_t *) &irn->attr;
+ be_op_t *bo = pmap_get(attr->factory->irn_op_map, get_irn_op(irn));
+
+ int i;
+
+ switch(reason) {
+ case dump_node_opcode_txt:
+ fprintf(f, get_op_name(bo->op));
+ break;
+ case dump_node_mode_txt:
+ fprintf(f, get_mode_name(get_irn_mode(irn)));
+ break;
+ case dump_node_nodeattr_txt:
+ fprintf(f, bo->cls->name);
+ break;
+ case dump_node_info_txt:
+ for(i = 0; i < attr->n_regs; ++i) {
+ const arch_register_t *reg = attr->reg[i];
+ fprintf(f, "reg #%d: %s\n", i, reg ? reg->name : "n/a");
+ }
+
+ if(bo->kind == node_kind_spill) {
+ be_spill_attr_t *a = (be_spill_attr_t *) attr;
+ ir_fprintf(f, "spill context: %+F\n", a->spill_ctx);
+ }
+ break;
+ }
+
+ return 1;
+}
+
+ir_node *insert_Perm_after(const be_main_env_t *env,
+ const arch_register_class_t *cls,
+ dom_front_info_t *dom_front,
+ ir_node *pos)
+{
+ const arch_env_t *arch_env = env->arch_env;
+ ir_node *bl = is_Block(pos) ? pos : get_nodes_block(pos);
+ ir_graph *irg = get_irn_irg(bl);
+ pset *live = put_live_end(bl, pset_new_ptr_default());
+ firm_dbg_module_t *dbg = firm_dbg_register("firm.be.node");
+