static firm_dbg_module_t *dbg = NULL;
#define DUMP_GRAPHS
-#define get_chordal_arch(ce) ((ce)->main_env->arch_env)
+#define get_chordal_arch(ce) ((ce)->birg->main_env->arch_env)
#define get_reg(irn) arch_get_irn_register(get_chordal_arch(chordal_env), irn)
#define set_reg(irn, reg) arch_set_irn_register(get_chordal_arch(chordal_env), irn, reg)
* Create a new Perm with the arguments just collected
* above in the arg_set and insert it into the schedule.
*/
- in = malloc(n_projs * sizeof(in[0]));
+ in = xmalloc(n_projs * sizeof(in[0]));
for(pp = set_first(arg_set); pp; pp = set_next(arg_set))
in[pp->pos] = pp->arg;
perm = be_new_Perm(chordal_env->cls, irg, pred_bl, n_projs, in);
free(in);
- insert_after = sched_skip(sched_last(pred_bl), 0, sched_skip_cf_predicator, chordal_env->main_env->arch_env);
+ insert_after = sched_skip(sched_last(pred_bl), 0, sched_skip_cf_predicator, chordal_env->birg->main_env->arch_env);
sched_add_after(insert_after, perm);
/*
assert(get_irn_mode(phi) == get_irn_mode(dupl));
set_irn_n(phi, i, dupl);
set_reg(dupl, phi_reg);
- sched_add_after(sched_skip(sched_last(arg_block), 0, sched_skip_cf_predicator, chordal_env->main_env->arch_env), dupl);
+ sched_add_after(sched_skip(sched_last(arg_block), 0, sched_skip_cf_predicator, chordal_env->birg->main_env->arch_env), dupl);
pin_irn(dupl, phi_block);
DBG((dbg, LEVEL_1, " they do interfere: insert %+F(%s)\n", dupl, get_reg(dupl)->name));
continue; /* with next argument */
DBG((dbg, LEVEL_1, "Placing perms...\n"));
irg_block_walk_graph(irg, insert_all_perms_walker, NULL, chordal_env);
#ifdef DUMP_GRAPHS
- dump_ir_block_graph_sched(irg, "-ssa_destr_perms_placed");
+ be_dump(irg, "-ssa_destr_perms_placed", dump_ir_block_graph_sched);
#endif
+ be_liveness(irg);
+
DBG((dbg, LEVEL_1, "Setting regs and placing dupls...\n"));
irg_block_walk_graph(irg, set_regs_or_place_dupls_walker, NULL, chordal_env);
#ifdef DUMP_GRAPHS
- dump_ir_block_graph_sched(irg, "-ssa_destr_regs_set");
+ be_dump(irg, "-ssa_destr_regs_set", dump_ir_block_graph_sched);
#endif
pmap_destroy(perm_map);