Commit 1dff67d7 authored by Matthias Braun's avatar Matthias Braun
Browse files

be: Move spillprepare steps to the register allocators

parent 25a40866
......@@ -52,6 +52,7 @@
#include "bespillslots.h"
#include "bespill.h"
#include "bespillutil.h"
#include "belower.h"
#include "becopystat.h"
......@@ -267,6 +268,8 @@ static void be_ra_chordal_main(ir_graph *irg)
{
be_timer_push(T_RA_OTHER);
be_spill_prepare_for_constraints(irg);
be_chordal_env_t chordal_env;
obstack_init(&chordal_env.obst);
chordal_env.opts = &options;
......
......@@ -535,13 +535,6 @@ static void be_gen_code_for_irg(ir_graph *irg)
stat_ev_ull("bemain_blocks_before_ra", be_count_blocks(irg));
}
be_timer_push(T_RA_CONSTR);
/* add CopyKeeps for should_be_different constrained nodes */
/* beware: needs schedule due to usage of be_ssa_constr */
be_spill_prepare_for_constraints(irg);
be_timer_pop(T_RA_CONSTR);
be_dump(DUMP_RA, irg, "spillprepare");
if (stat_ev_enabled) {
be_stat_values(irg);
}
......
......@@ -1812,9 +1812,10 @@ static void spill(void)
*/
static void be_pref_alloc(ir_graph *new_irg)
{
irg = new_irg;
obstack_init(&obst);
irg = new_irg;
be_spill_prepare_for_constraints(irg);
/* determine a good coloring order */
determine_block_order();
......
......@@ -1147,6 +1147,7 @@ static void add_missing_keep_walker(ir_node *node, void *data)
void be_spill_prepare_for_constraints(ir_graph *irg)
{
FIRM_DBG_REGISTER(dbg_constr, "firm.be.lower.constr");
be_timer_push(T_RA_CONSTR);
irg_walk_graph(irg, add_missing_keep_walker, NULL, NULL);
......@@ -1223,6 +1224,8 @@ void be_spill_prepare_for_constraints(ir_graph *irg)
stat_ev_ull("ra_multi_precol_copies", multi_precol_copies);
stat_ev_ull("ra_constrained_livethrough_copies",
constrained_livethrough_copies);
be_timer_pop(T_RA_CONSTR);
be_dump(DUMP_RA, irg, "spillprepare");
}
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_spill)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment