Commit d2e85e55 authored by Michael Beck's avatar Michael Beck
Browse files

- let be_liveness() take the irg, not the birg which was just copied around

[r23613]
parent 8d75fa23
......@@ -35,7 +35,7 @@ be_lv_t *be_assure_liveness(be_irg_t *birg)
if (birg->lv != NULL)
return birg->lv;
return birg->lv = be_liveness(birg);
return birg->lv = be_liveness(birg->irg);
}
void be_assure_dom_front(be_irg_t *birg)
......
......@@ -589,12 +589,11 @@ void be_liveness_invalidate(be_lv_t *lv)
}
/* Compute the inter block liveness for a graph. */
be_lv_t *be_liveness(const be_irg_t *birg)
be_lv_t *be_liveness(ir_graph *irg)
{
be_lv_t *lv = XMALLOCZ(be_lv_t);
lv->irg = be_get_birg_irg(birg);
lv->birg = birg;
lv->irg = irg;
#ifdef USE_LIVE_CHK
lv->dfs = dfs_new(&absgraph_irg_cfg_succ, lv->irg);
lv->lvc = lv_chk_new(lv->irg, lv->dfs);
......@@ -717,7 +716,7 @@ static void lv_check_walker(ir_node *bl, void *data)
void be_liveness_check(be_lv_t *lv)
{
lv_walker_t w;
be_lv_t *fresh = be_liveness(lv->birg);
be_lv_t *fresh = be_liveness(lv->irg);
w.lv = lv;
w.data = fresh;
......
......@@ -52,7 +52,7 @@ typedef struct _be_lv_info_t be_lv_info_t;
* Compute the inter block liveness for a graph.
* @param irg The graph.
*/
be_lv_t *be_liveness(const struct be_irg_t *birg);
be_lv_t *be_liveness(ir_graph *irg);
/**
* Check the given liveness information against a freshly computed one.
......
......@@ -50,7 +50,6 @@ struct _be_lv_t {
ir_phase ph;
ir_graph *irg;
dfs_t *dfs;
const struct be_irg_t *birg;
bitset_t *nodes;
hook_entry_t hook_info;
#ifdef USE_LIVE_CHK
......
......@@ -2168,7 +2168,7 @@ void rss_schedule_preparation(be_irg_t *birg) {
rss.h = heights_new(irg);
rss.nodes = plist_new();
rss.opts = &rss_options;
rss.liveness = be_liveness(birg);
rss.liveness = be_liveness(irg);
be_liveness_assure_sets(rss.liveness);
irg_block_walk_graph(irg, NULL, process_block, &rss);
heights_free(rss.h);
......
......@@ -502,7 +502,7 @@ static trace_env_t *trace_init(const be_irg_t *birg) {
env->curr_time = 0;
env->sched_info = NEW_ARR_F(trace_irn_t, nn);
env->liveness = be_liveness(birg);
env->liveness = be_liveness(irg);
FIRM_DBG_REGISTER(env->dbg, "firm.be.sched.trace");
be_liveness_assure_chk(env->liveness);
......
......@@ -441,6 +441,6 @@ void be_transform_graph(be_irg_t *birg, arch_pretrans_nodes *func)
if (birg->lv) {
be_liveness_free(birg->lv);
birg->lv = be_liveness(birg);
birg->lv = be_liveness(irg);
}
}
......@@ -122,7 +122,7 @@ int be_verify_register_pressure(const be_irg_t *birg,
ir_graph *irg) {
be_verify_register_pressure_env_t env;
env.lv = be_liveness(birg);
env.lv = be_liveness(irg);
env.irg = irg;
env.cls = cls;
env.registers_available = env.cls->n_regs - be_put_ignore_regs(birg, env.cls, NULL);
......@@ -869,7 +869,7 @@ static void verify_block_register_allocation(ir_node *block, void *data) {
int be_verify_register_allocation(const be_irg_t *birg) {
arch_env = be_get_birg_arch_env(birg);
irg = be_get_birg_irg(birg);
lv = be_liveness(birg);
lv = be_liveness(irg);
problem_found = 0;
be_liveness_assure_sets(lv);
......
Markdown is supported
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