#include "iterator.h"
#include "firm_config.h"
-#ifdef WITH_LIBCORE
#include <libcore/lc_opts.h>
#include <libcore/lc_opts_enum.h>
#include <libcore/lc_timing.h>
-#endif /* WITH_LIBCORE */
#include "ircons_t.h"
#include "irmode_t.h"
BE_CH_VRFY_WARN,
};
-/** Enable extreme live range splitting. */
-static int be_elr_split = 0;
-
typedef struct _post_spill_env_t {
be_chordal_env_t cenv;
be_irg_t *birg;
LC_OPT_ENT_ENUM_PTR ("perm", "perm lowering options", &lower_perm_var),
LC_OPT_ENT_ENUM_MASK("dump", "select dump phases", &dump_var),
LC_OPT_ENT_ENUM_PTR ("vrfy", "verify options", &be_ch_vrfy_var),
- LC_OPT_ENT_BOOL ("elrsplit", "enable extreme live range splitting", &be_elr_split),
{ NULL }
};
return cnt;
}
-#ifdef WITH_LIBCORE
/**
* Initialize all timers.
*/
lc_timer_get_name(tmp), lc_timer_get_name(timer)); \
timer = tmp; \
}
-#else
-
-#define BE_TIMER_INIT(main_opts)
-#define BE_TIMER_PUSH(timer)
-#define BE_TIMER_POP(timer)
-
-#endif /* WITH_LIBCORE */
/**
* Perform things which need to be done per register class before spilling.
if (be_stat_ev_is_active()) {
pse->pre_spill_cost = be_estimate_irg_costs(birg->irg,
birg->main_env->arch_env, birg->exec_freq);
+ be_stat_ev_pop();
}
#endif /* FIRM_STATISTICS */
}
ir_graph *irg = birg->irg;
const be_main_env_t *main_env = birg->main_env;
be_options_t *main_opts = main_env->options;
- static int splitted = 0;
node_stat_t node_stat;
#ifdef FIRM_STATISTICS
if (be_stat_ev_is_active()) {
double spillcosts = be_estimate_irg_costs(irg, main_env->arch_env, birg->exec_freq) - pse->pre_spill_cost;
+ be_stat_tags[STAT_TAG_CLS] = pse->cls->name;
+ be_stat_ev_push(be_stat_tags, STAT_TAG_LAST, be_stat_file);
+
be_stat_ev_l("spillcosts", (long) spillcosts);
node_stats(birg, pse->cls, &node_stat);
}
BE_TIMER_POP(ra_timer.t_verify);
- if (be_elr_split && ! splitted) {
- extreme_liverange_splitting(chordal_env);
- splitted = 1;
- }
-
/* Color the graph. */
BE_TIMER_PUSH(ra_timer.t_color);
be_ra_chordal_color(chordal_env);
post_spill(&pse, 0);
}
- }
- else {
+ } else {
post_spill_env_t *pse;
/* the backend has it's own spiller */
}
}
- BE_TIMER_PUSH(ra_timer.t_spillslots);
-
- be_coalesce_spillslots(&chordal_env);
- dump(BE_CH_DUMP_SPILLSLOTS, irg, NULL, "-spillslots", dump_ir_block_graph_sched);
-
- BE_TIMER_POP(ra_timer.t_spillslots);
-
- BE_TIMER_PUSH(ra_timer.t_verify);
- /* verify spillslots */
- if (options.vrfy_option == BE_CH_VRFY_WARN) {
- be_verify_spillslots(main_env->arch_env, irg);
- }
- else if (options.vrfy_option == BE_CH_VRFY_ASSERT) {
- assert(be_verify_spillslots(main_env->arch_env, irg) && "Spillslot verification failed");
- }
- BE_TIMER_POP(ra_timer.t_verify);
-
BE_TIMER_PUSH(ra_timer.t_epilog);
- dump(BE_CH_DUMP_LOWER, irg, NULL, "-spilloff", dump_ir_block_graph_sched);
-
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);