#include "benode_t.h"
#include "besched_t.h"
-static firm_dbg_module_t *dbg = NULL;
+DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
#define DUMP_GRAPHS
#define get_chordal_arch(ce) ((ce)->birg->main_env->arch_env)
* 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;
pmap *perm_map = pmap_create();
ir_graph *irg = chordal_env->irg;
- dbg = firm_dbg_register("ir.be.ssadestr");
+ FIRM_DBG_REGISTER(dbg, "ir.be.ssadestr");
/* create a map for fast lookup of perms: block --> perm */
chordal_env->data = perm_map;
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);