Commit 57fb9fc8 authored by Matthias Braun's avatar Matthias Braun
Browse files

refactor time measurement

[r17317]
parent caba0f02
......@@ -26,6 +26,8 @@
#ifndef FIRM_BE_BE_T_H
#define FIRM_BE_BE_T_H
#include <libcore/lc_timing.h>
#include "firm_types.h"
#include "obst.h"
#include "debug.h"
......@@ -93,7 +95,43 @@ struct be_main_env_t {
* @param bs The bitset (may be NULL).
* @return The number of registers to be ignored.
*/
unsigned be_put_ignore_regs(const be_irg_t *birg, const arch_register_class_t *cls,
bitset_t *bs);
unsigned be_put_ignore_regs(const be_irg_t *birg,
const arch_register_class_t *cls, bitset_t *bs);
extern int be_timing;
#define BE_TIMER_PUSH(timer) \
if (be_timing) { \
int res = lc_timer_push(timer); \
assert(res && "Timer already on stack, cannot be pushed twice."); \
}
#define BE_TIMER_POP(timer) \
if (be_timing) { \
lc_timer_t *tmp = lc_timer_pop(); \
assert(tmp == timer && "Attempt to pop wrong timer."); \
}
extern lc_timer_t *t_abi;
extern lc_timer_t *t_codegen;
extern lc_timer_t *t_sched;
extern lc_timer_t *t_constr;
extern lc_timer_t *t_finish;
extern lc_timer_t *t_emit;
extern lc_timer_t *t_other;
extern lc_timer_t *t_verify;
extern lc_timer_t *t_heights;
extern lc_timer_t *t_live; /**< timer for liveness calculation */
extern lc_timer_t *t_ssa_constr; /**< timer for ssa reconstruction */
extern lc_timer_t *t_ra_prolog; /**< timer for prolog */
extern lc_timer_t *t_ra_epilog; /**< timer for epilog */
extern lc_timer_t *t_ra_constr; /**< timer for spill constraints */
extern lc_timer_t *t_ra_spill; /**< timer for spilling */
extern lc_timer_t *t_ra_spill_apply;
extern lc_timer_t *t_ra_color; /**< timer for graph coloring */
extern lc_timer_t *t_ra_ifg; /**< timer for building interference graph */
extern lc_timer_t *t_ra_copymin; /**< timer for copy minimization */
extern lc_timer_t *t_ra_ssa; /**< timer for ssa destruction */
extern lc_timer_t *t_ra_other; /**< timer for remaining stuff */
#endif /* FIRM_BE_BE_T_H */
......@@ -108,19 +108,6 @@ typedef struct _post_spill_env_t {
} post_spill_env_t;
static be_options_t *main_opts;
static be_ra_timer_t ra_timer = {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
};
static const lc_opt_enum_int_items_t lower_perm_items[] = {
{ "copy", BE_CH_LOWER_PERM_COPY },
......@@ -330,61 +317,6 @@ static unsigned int count_insns(ir_graph *irg)
return cnt;
}
/**
* Initialize all timers.
*/
static void be_init_timer(be_options_t *main_opts)
{
if (main_opts->timing == BE_TIME_ON) {
ra_timer.t_prolog = lc_timer_register("time_ra_prolog", "regalloc prolog");
ra_timer.t_epilog = lc_timer_register("time_ra_epilog", "regalloc epilog");
ra_timer.t_live = lc_timer_register("time_ra_liveness", "be liveness");
ra_timer.t_spill = lc_timer_register("time_ra_spill", "spiller");
ra_timer.t_color = lc_timer_register("time_ra_color", "graph coloring");
ra_timer.t_ifg = lc_timer_register("time_ra_ifg", "interference graph");
ra_timer.t_copymin = lc_timer_register("time_ra_copymin", "copy minimization");
ra_timer.t_ssa = lc_timer_register("time_ra_ssadestr", "ssa destruction");
ra_timer.t_verify = lc_timer_register("time_ra_verify", "graph verification");
ra_timer.t_other = lc_timer_register("time_ra_other", "other time");
LC_STOP_AND_RESET_TIMER(ra_timer.t_prolog);
LC_STOP_AND_RESET_TIMER(ra_timer.t_epilog);
LC_STOP_AND_RESET_TIMER(ra_timer.t_live);
LC_STOP_AND_RESET_TIMER(ra_timer.t_spill);
LC_STOP_AND_RESET_TIMER(ra_timer.t_color);
LC_STOP_AND_RESET_TIMER(ra_timer.t_ifg);
LC_STOP_AND_RESET_TIMER(ra_timer.t_copymin);
LC_STOP_AND_RESET_TIMER(ra_timer.t_ssa);
LC_STOP_AND_RESET_TIMER(ra_timer.t_verify);
LC_STOP_AND_RESET_TIMER(ra_timer.t_other);
global_ra_timer = &ra_timer;
}
}
#define BE_TIMER_INIT(main_opts) be_init_timer(main_opts)
#define BE_TIMER_PUSH(timer) \
if (main_opts->timing == BE_TIME_ON) { \
if (! lc_timer_push(timer)) { \
if (options.vrfy_option == BE_CH_VRFY_ASSERT) \
assert(!"Timer already on stack, cannot be pushed twice."); \
else if (options.vrfy_option == BE_CH_VRFY_WARN) \
fprintf(stderr, "Timer %s already on stack, cannot be pushed twice.\n", \
lc_timer_get_name(timer)); \
} \
}
#define BE_TIMER_POP(timer) \
if (main_opts->timing == BE_TIME_ON) { \
lc_timer_t *tmp = lc_timer_pop(); \
if (options.vrfy_option == BE_CH_VRFY_ASSERT) \
assert(tmp == timer && "Attempt to pop wrong timer."); \
else if (options.vrfy_option == BE_CH_VRFY_WARN && tmp != timer) \
fprintf(stderr, "Attempt to pop wrong timer. %s is on stack, trying to pop %s.\n", \
lc_timer_get_name(tmp), lc_timer_get_name(timer)); \
timer = tmp; \
}
/**
* Perform things which need to be done per register class before spilling.
*/
......@@ -401,13 +333,8 @@ static void pre_spill(post_spill_env_t *pse, const arch_register_class_t *cls)
chordal_env->border_heads = pmap_create();
chordal_env->ignore_colors = bitset_malloc(chordal_env->cls->n_regs);
BE_TIMER_PUSH(ra_timer.t_live);
be_assure_liveness(birg);
BE_TIMER_POP(ra_timer.t_live);
BE_TIMER_PUSH(ra_timer.t_verify);
be_liveness_assure_chk(be_get_birg_liveness(birg));
BE_TIMER_POP(ra_timer.t_verify);
stat_ev_ctx_push_str("bechordal_cls", pse->cls->name);
stat_ev_do(node_stats(birg, pse->cls, &node_stat));
......@@ -417,7 +344,10 @@ static void pre_spill(post_spill_env_t *pse, const arch_register_class_t *cls)
/* put all ignore registers into the ignore register set. */
be_put_ignore_regs(birg, pse->cls, chordal_env->ignore_colors);
BE_TIMER_PUSH(t_ra_constr);
be_pre_spill_prepare_constr(chordal_env);
BE_TIMER_POP(t_ra_constr);
dump(BE_CH_DUMP_CONSTR, birg->irg, pse->cls, "-constr-pre", dump_ir_block_graph_sched);
stat_ev_ctx_pop("bechordal_cls");
......@@ -451,12 +381,14 @@ static void post_spill(post_spill_env_t *pse, int iteration) {
called in a loop after spilling for each register class.
But we only need to fix stack nodes once in this case.
*/
BE_TIMER_PUSH(t_ra_spill);
check_for_memory_operands(chordal_env);
if (iteration == 0) {
check_for_memory_operands(chordal_env);
be_abi_fix_stack_nodes(birg->abi);
}
BE_TIMER_POP(t_ra_spill);
BE_TIMER_PUSH(ra_timer.t_verify);
BE_TIMER_PUSH(t_verify);
/* verify schedule and register pressure */
if (chordal_env->opts->vrfy_option == BE_CH_VRFY_WARN) {
......@@ -468,19 +400,19 @@ static void post_spill(post_spill_env_t *pse, int iteration) {
assert(be_verify_register_pressure(birg, pse->cls, irg)
&& "Register pressure verification failed");
}
BE_TIMER_POP(ra_timer.t_verify);
BE_TIMER_POP(t_verify);
/* Color the graph. */
BE_TIMER_PUSH(ra_timer.t_color);
BE_TIMER_PUSH(t_ra_color);
be_ra_chordal_color(chordal_env);
BE_TIMER_POP(ra_timer.t_color);
BE_TIMER_POP(t_ra_color);
dump(BE_CH_DUMP_CONSTR, irg, pse->cls, "-color", dump_ir_block_graph_sched);
/* Create the ifg with the selected flavor */
BE_TIMER_PUSH(ra_timer.t_ifg);
BE_TIMER_PUSH(t_ra_ifg);
chordal_env->ifg = be_create_ifg(chordal_env);
BE_TIMER_POP(ra_timer.t_ifg);
BE_TIMER_POP(t_ra_ifg);
{
be_ifg_stat_t stat;
......@@ -496,28 +428,27 @@ static void post_spill(post_spill_env_t *pse, int iteration) {
}
/* copy minimization */
BE_TIMER_PUSH(ra_timer.t_copymin);
BE_TIMER_PUSH(t_ra_copymin);
co_driver(chordal_env);
BE_TIMER_POP(ra_timer.t_copymin);
BE_TIMER_POP(t_ra_copymin);
dump(BE_CH_DUMP_COPYMIN, irg, pse->cls, "-copymin", dump_ir_block_graph_sched);
BE_TIMER_PUSH(ra_timer.t_ssa);
/* ssa destruction */
BE_TIMER_PUSH(t_ra_ssa);
stat_ev_ctx_push_str("berachordal_phase", "ssadestr");
be_ssa_destruction(chordal_env);
stat_ev_ctx_pop("berachordal_phase");
BE_TIMER_POP(ra_timer.t_ssa);
BE_TIMER_POP(t_ra_ssa);
dump(BE_CH_DUMP_SSADESTR, irg, pse->cls, "-ssadestr", dump_ir_block_graph_sched);
BE_TIMER_PUSH(ra_timer.t_verify);
if (chordal_env->opts->vrfy_option != BE_CH_VRFY_OFF) {
BE_TIMER_PUSH(t_verify);
be_ssa_destruction_check(chordal_env);
BE_TIMER_POP(t_verify);
}
BE_TIMER_POP(ra_timer.t_verify);
stat_ev_do(node_stats(birg, pse->cls, &node_stat));
stat_ev_dbl("perms_after_coal", node_stat.n_perms);
......@@ -550,9 +481,9 @@ static void be_ra_chordal_main(be_irg_t *birg)
main_opts = main_env->options;
BE_TIMER_INIT(main_opts);
BE_TIMER_PUSH(ra_timer.t_other);
BE_TIMER_PUSH(ra_timer.t_prolog);
BE_TIMER_PUSH(t_ra_other);
BE_TIMER_PUSH(t_ra_prolog);
be_assure_dom_front(birg);
be_assure_liveness(birg);
......@@ -567,11 +498,11 @@ static void be_ra_chordal_main(be_irg_t *birg)
obstack_init(&obst);
BE_TIMER_POP(ra_timer.t_prolog);
be_stat_ev("insns_before", count_insns(irg));
BE_TIMER_POP(t_ra_prolog);
stat_ev_if {
be_stat_ev("insns_before", count_insns(irg));
}
if (! arch_code_generator_has_spiller(birg->cg)) {
/* use one of the generic spiller */
......@@ -590,16 +521,9 @@ static void be_ra_chordal_main(be_irg_t *birg)
pse.birg = birg;
pre_spill(&pse, cls);
#if 0
/* this is a hack, TODO remove me later */
if(j == 2) {
be_do_stat_reg_pressure(birg);
}
#endif
BE_TIMER_PUSH(ra_timer.t_spill);
BE_TIMER_PUSH(t_ra_spill);
be_do_spill(birg, cls);
BE_TIMER_POP(ra_timer.t_spill);
BE_TIMER_POP(t_ra_spill);
dump(BE_CH_DUMP_SPILL, irg, pse.cls, "-spill",
dump_ir_block_graph_sched);
......@@ -620,9 +544,9 @@ static void be_ra_chordal_main(be_irg_t *birg)
pre_spill(&pse[j], pse[j].cls);
}
BE_TIMER_PUSH(ra_timer.t_spill);
BE_TIMER_PUSH(t_ra_spill);
arch_code_generator_spill(birg->cg, birg);
BE_TIMER_POP(ra_timer.t_spill);
BE_TIMER_POP(t_ra_spill);
dump(BE_CH_DUMP_SPILL, irg, NULL, "-spill", dump_ir_block_graph_sched);
for (j = 0; j < m; ++j) {
......@@ -630,20 +554,23 @@ static void be_ra_chordal_main(be_irg_t *birg)
}
}
BE_TIMER_PUSH(t_verify);
be_verify_register_allocation(birg);
BE_TIMER_POP(t_verify);
BE_TIMER_PUSH(ra_timer.t_epilog);
BE_TIMER_PUSH(t_ra_epilog);
lower_nodes_after_ra(birg, options.lower_perm_opt & BE_CH_LOWER_PERM_COPY ? 1 : 0);
dump(BE_CH_DUMP_LOWER, irg, NULL, "-belower-after-ra", dump_ir_block_graph_sched);
obstack_free(&obst, NULL);
be_liveness_invalidate(be_get_birg_liveness(birg));
BE_TIMER_POP(ra_timer.t_epilog);
BE_TIMER_POP(t_ra_epilog);
BE_TIMER_POP(ra_timer.t_other);
BE_TIMER_POP(t_ra_other);
be_stat_ev("insns_after", count_insns(irg));
stat_ev_if {
be_stat_ev("insns_after", count_insns(irg));
}
return;
}
......
......@@ -547,17 +547,23 @@ static void compute_liveness(be_lv_t *lv)
void be_liveness_assure_sets(be_lv_t *lv)
{
if (!lv->nodes) {
BE_TIMER_PUSH(t_live);
lv->nodes = bitset_malloc(2 * get_irg_last_idx(lv->irg));
phase_init(&lv->ph, "liveness", lv->irg, PHASE_DEFAULT_GROWTH, lv_phase_data_init, NULL);
compute_liveness(lv);
/* be_live_chk_compare(lv, lv->lvc); */
BE_TIMER_POP(t_live);
}
}
void be_liveness_assure_chk(be_lv_t *lv)
{
#ifndef USE_LIVE_CHK
BE_TIMER_PUSH(t_verify);
be_liveness_assure_sets(lv);
BE_TIMER_POP(t_verify);
#else
(void) lv;
#endif
......@@ -593,6 +599,8 @@ be_lv_t *be_liveness(const be_irg_t *birg)
void be_liveness_recompute(be_lv_t *lv)
{
BE_TIMER_PUSH(t_live);
unsigned last_idx = get_irg_last_idx(lv->irg);
if(last_idx >= bitset_size(lv->nodes)) {
bitset_free(lv->nodes);
......@@ -605,6 +613,8 @@ void be_liveness_recompute(be_lv_t *lv)
phase_free(&lv->ph);
phase_init(&lv->ph, "liveness", lv->irg, PHASE_DEFAULT_GROWTH, lv_phase_data_init, NULL);
compute_liveness(lv);
BE_TIMER_POP(t_live);
}
......
......@@ -332,27 +332,30 @@ static void initialize_birg(be_irg_t *birg, ir_graph *irg, be_main_env_t *env)
dump(DUMP_INITIAL, irg, "-prepared", dump_ir_block_graph);
}
#define BE_TIMER_PUSH(timer) \
if (be_options.timing == BE_TIME_ON) { \
int res = lc_timer_push(timer); \
if (be_options.vrfy_option == BE_VRFY_ASSERT) \
assert(res && "Timer already on stack, cannot be pushed twice."); \
else if (be_options.vrfy_option == BE_VRFY_WARN && ! res) \
fprintf(stderr, "Timer %s already on stack, cannot be pushed twice.\n", \
lc_timer_get_name(timer)); \
}
#define BE_TIMER_POP(timer) \
if (be_options.timing == BE_TIME_ON) { \
lc_timer_t *tmp = lc_timer_pop(); \
if (be_options.vrfy_option == BE_VRFY_ASSERT) \
assert(tmp == timer && "Attempt to pop wrong timer."); \
else if (be_options.vrfy_option == BE_VRFY_WARN && tmp != timer) \
fprintf(stderr, "Attempt to pop wrong timer. %s is on stack, trying to pop %s.\n", \
lc_timer_get_name(tmp), lc_timer_get_name(timer)); \
timer = tmp; \
}
#define BE_TIMER_ONLY(code) do { if (be_options.timing == BE_TIME_ON) { code; } } while(0)
#define BE_TIMER_ONLY(code) do { if (be_timing) { code; } } while(0)
int be_timing;
lc_timer_t *t_abi;
lc_timer_t *t_codegen;
lc_timer_t *t_sched;
lc_timer_t *t_constr;
lc_timer_t *t_finish;
lc_timer_t *t_emit;
lc_timer_t *t_other;
lc_timer_t *t_verify;
lc_timer_t *t_heights;
lc_timer_t *t_live;
lc_timer_t *t_ssa_constr;
lc_timer_t *t_ra_constr;
lc_timer_t *t_ra_prolog;
lc_timer_t *t_ra_epilog;
lc_timer_t *t_ra_spill;
lc_timer_t *t_ra_spill_apply;
lc_timer_t *t_ra_color;
lc_timer_t *t_ra_ifg;
lc_timer_t *t_ra_copymin;
lc_timer_t *t_ra_ssa;
lc_timer_t *t_ra_other;
/**
* The Firm backend main loop.
......@@ -367,35 +370,37 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
int i;
arch_isa_t *isa;
be_main_env_t env;
unsigned num_nodes_b = 0;
unsigned num_nodes_a = 0;
unsigned num_nodes_r = 0;
char prof_filename[256];
static const char suffix[] = ".prof";
be_irg_t *birgs;
int num_birgs;
ir_graph **irg_list, **backend_irg_list;
lc_timer_t *t_abi = NULL;
lc_timer_t *t_codegen = NULL;
lc_timer_t *t_sched = NULL;
lc_timer_t *t_constr = NULL;
lc_timer_t *t_regalloc = NULL;
lc_timer_t *t_finish = NULL;
lc_timer_t *t_emit = NULL;
lc_timer_t *t_other = NULL;
lc_timer_t *t_verify = NULL;
if (be_options.timing == BE_TIME_ON) {
t_abi = lc_timer_register("time_beabi", "be abi introduction");
t_codegen = lc_timer_register("time_codegen", "codegeneration");
t_sched = lc_timer_register("time_sched", "scheduling");
t_constr = lc_timer_register("time_constr", "assure constraints");
t_regalloc = lc_timer_register("time_regalloc", "register allocation");
t_finish = lc_timer_register("time_finish", "graph finish");
t_emit = lc_timer_register("time_emiter", "code emiter");
t_verify = lc_timer_register("time_verify", "graph verification");
t_other = lc_timer_register("time_other", "other");
be_timing = (be_options.timing == BE_TIME_ON);
if (be_timing) {
t_abi = lc_timer_register("time_beabi", "be abi introduction");
t_codegen = lc_timer_register("time_codegen", "codegeneration");
t_sched = lc_timer_register("time_sched", "scheduling");
t_constr = lc_timer_register("time_constr", "assure constraints");
t_finish = lc_timer_register("time_finish", "graph finish");
t_emit = lc_timer_register("time_emiter", "code emiter");
t_verify = lc_timer_register("time_verify", "graph verification");
t_other = lc_timer_register("time_other", "other");
t_heights = lc_timer_register("time_heights", "heights");
t_live = lc_timer_register("time_liveness", "be liveness");
t_ssa_constr = lc_timer_register("time_ssa_constr", "ssa reconstruction");
t_ra_prolog = lc_timer_register("time_ra_prolog", "regalloc prolog");
t_ra_epilog = lc_timer_register("time_ra_epilog", "regalloc epilog");
t_ra_constr = lc_timer_register("time_ra_constr", "regalloc constraints");
t_ra_spill = lc_timer_register("time_ra_spill", "spiller");
t_ra_spill_apply
= lc_timer_register("time_ra_spill_apply", "apply spills");
t_ra_color = lc_timer_register("time_ra_color", "graph coloring");
t_ra_ifg = lc_timer_register("time_ra_ifg", "interference graph");
t_ra_copymin = lc_timer_register("time_ra_copymin", "copy minimization");
t_ra_ssa = lc_timer_register("time_ra_ssadestr", "ssa destruction");
t_ra_other = lc_timer_register("time_ra_other", "regalloc other");
}
be_init_env(&env, file_handle);
......@@ -465,7 +470,6 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
LC_STOP_AND_RESET_TIMER(t_codegen);
LC_STOP_AND_RESET_TIMER(t_sched);
LC_STOP_AND_RESET_TIMER(t_constr);
LC_STOP_AND_RESET_TIMER(t_regalloc);
LC_STOP_AND_RESET_TIMER(t_finish);
LC_STOP_AND_RESET_TIMER(t_emit);
LC_STOP_AND_RESET_TIMER(t_verify);
......@@ -484,8 +488,6 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
}
BE_TIMER_POP(t_verify);
BE_TIMER_ONLY(num_nodes_b = get_num_reachable_nodes(irg));
/* Get the code generator interface. */
cg_if = isa->impl->get_code_generator_if(isa);
......@@ -524,7 +526,6 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
be_do_stat_nodes(irg, "03 Prepare");
dump(DUMP_PREPARED, irg, "-prepared", dump_ir_block_graph);
BE_TIMER_ONLY(num_nodes_r = get_num_reachable_nodes(irg));
if (be_options.vrfy_option == BE_VRFY_WARN) {
be_check_dominance(irg);
......@@ -621,9 +622,7 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
#endif
/* Do register allocation */
BE_TIMER_PUSH(t_regalloc);
be_allocate_registers(birg);
BE_TIMER_POP(t_regalloc);
#ifdef FIRM_STATISTICS
stat_ev_dbl("costs_before_ra", be_estimate_irg_costs(irg, env.arch_env, birg->exec_freq));
......@@ -685,7 +684,6 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
be_do_stat_nodes(irg, "07 Final");
restore_optimization_state(&state);
BE_TIMER_ONLY(num_nodes_a = get_num_reachable_nodes(irg));
BE_TIMER_POP(t_other);
#define LC_EMIT(timer) \
......@@ -695,44 +693,30 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
printf("%-20s: %.3lf msec\n", lc_timer_get_description(timer), (double)lc_timer_elapsed_usec(timer) / 1000.0); \
}
#define LC_EMIT_RA(timer) \
stat_ev_if { \
stat_ev_dbl(lc_timer_get_name(timer), lc_timer_elapsed_msec(timer)); \
} else { \
printf("\t%-20s: %.3lf msec\n", lc_timer_get_description(timer), (double)lc_timer_elapsed_usec(timer) / 1000.0); \
}
BE_TIMER_ONLY(
stat_ev_if {
} else {
printf("==>> IRG %s <<==\n", get_entity_name(get_irg_entity(irg)));
printf("# nodes at begin: %u\n", num_nodes_b);
printf("# nodes before ra: %u\n", num_nodes_r);
printf("# nodes at end: %u\n\n", num_nodes_a);
}
printf("==>> IRG %s <<==\n", get_entity_name(get_irg_entity(irg)));
LC_EMIT(t_abi);
LC_EMIT(t_codegen);
LC_EMIT(t_sched);
LC_EMIT(t_live);
LC_EMIT(t_heights);
LC_EMIT(t_ssa_constr);
LC_EMIT(t_constr);
LC_EMIT(t_regalloc);
if(global_ra_timer != NULL) {
LC_EMIT_RA(global_ra_timer->t_prolog);
LC_EMIT_RA(global_ra_timer->t_live);
LC_EMIT_RA(global_ra_timer->t_spill);
LC_EMIT_RA(global_ra_timer->t_color);
LC_EMIT_RA(global_ra_timer->t_ifg);
LC_EMIT_RA(global_ra_timer->t_copymin);
LC_EMIT_RA(global_ra_timer->t_ssa);
LC_EMIT_RA(global_ra_timer->t_epilog);
LC_EMIT_RA(global_ra_timer->t_verify);
LC_EMIT_RA(global_ra_timer->t_other);
}
LC_EMIT(t_ra_prolog);
LC_EMIT(t_ra_spill);
LC_EMIT(t_ra_spill_apply);
LC_EMIT(t_ra_constr);
LC_EMIT(t_ra_color);
LC_EMIT(t_ra_ifg);
LC_EMIT(t_ra_copymin);
LC_EMIT(t_ra_ssa);
LC_EMIT(t_ra_epilog);
LC_EMIT(t_ra_other);
LC_EMIT(t_finish);
LC_EMIT(t_emit);
LC_EMIT(t_verify);
LC_EMIT(t_other);
);
#undef LC_EMIT_RA
#undef LC_EMIT
be_sched_free_phase(irg);
......@@ -750,10 +734,6 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
}
ir_profile_free();
be_done_env(&env);
#undef BE_TIMER_POP
#undef BE_TIMER_PUSH
#undef BE_TIMER_ONLY
}
/* Main interface to the frontend. */
......
......@@ -44,8 +44,6 @@
#include "belive_t.h"
#include "bemodule.h"
be_ra_timer_t *global_ra_timer = NULL;
/** The list of register allocators */
static be_module_list_entry_t *register_allocators = NULL;
static be_ra_t *selected_allocator = NULL;
......
......@@ -34,21 +34,6 @@
#include "belive.h"
#include "beirg.h"
typedef struct {
lc_timer_t *t_prolog; /**< timer for prolog */
lc_timer_t *t_epilog; /**< timer for epilog */
lc_timer_t *t_live; /**< timer for liveness calculation */
lc_timer_t *t_spill; /**< timer for spilling */
lc_timer_t *t_color; /**< timer for graph coloring */
lc_timer_t *t_ifg; /**< timer for building interference graph */
lc_timer_t *t_copymin; /**< timer for copy minimization */
lc_timer_t *t_ssa; /**< timer for ssa destruction */
lc_timer_t *t_verify; /**< timer for verification runs */
lc_timer_t *t_other; /**< timer for remaining stuff */
} be_ra_timer_t;
extern be_ra_timer_t *global_ra_timer;
typedef struct be_ra_t {
void (*allocate)(be_irg_t *bi); /**< allocate registers on a graph */
} be_ra_t;
......
......@@ -61,6 +61,7 @@
#include "beirg_t.h"
#include "beintlive_t.h"
#include "bemodule.h"
#include "be_t.h"
DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
......@@ -886,6 +887,8 @@ void be_insert_spills_reloads(spill_env_t *env)
ir_nodeset_iterator_t iter;
ir_node *node;