From: Christoph Mallon Date: Sat, 11 Oct 2008 19:49:05 +0000 (+0000) Subject: Remove the unused parameter const arch_env_t *arch_env from be_reload(). X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=3b0e3f49355079844d87dc1ccb46a39adbc2bd95;p=libfirm Remove the unused parameter const arch_env_t *arch_env from be_reload(). [r22734] --- diff --git a/ir/be/benode.c b/ir/be/benode.c index 79dd58501..a4f5ca520 100644 --- a/ir/be/benode.c +++ b/ir/be/benode.c @@ -1043,14 +1043,13 @@ ir_node *be_spill(ir_node *block, ir_node *irn) return spill; } -ir_node *be_reload(const arch_env_t *arch_env, const arch_register_class_t *cls, ir_node *insert, ir_mode *mode, ir_node *spill) +ir_node *be_reload(const arch_register_class_t *cls, ir_node *insert, ir_mode *mode, ir_node *spill) { ir_node *reload; ir_node *bl = is_Block(insert) ? insert : get_nodes_block(insert); ir_graph *irg = get_irn_irg(bl); ir_node *frame = get_irg_frame(irg); const arch_register_class_t *cls_frame = arch_get_irn_reg_class(frame, -1); - (void)arch_env; // TODO remove parameter assert(be_is_Spill(spill) || (is_Phi(spill) && get_irn_mode(spill) == mode_M)); diff --git a/ir/be/benode_t.h b/ir/be/benode_t.h index 2c3ca8c9d..8794a2109 100644 --- a/ir/be/benode_t.h +++ b/ir/be/benode_t.h @@ -378,14 +378,13 @@ ir_node *be_spill(ir_node *block, ir_node *irn); /** * Make a reload and insert it into the schedule. * - * @param arch_env The architecture environment. * @param cls The register class of the reloaded value. * @param insert The node in the schedule in front of which the reload is inserted. * @param mode The mode of the original (spilled) value. * @param spill The spill node corresponding to this reload. * @return A freshly made reload. */ -ir_node *be_reload(const arch_env_t *arch_env, const arch_register_class_t *cls, ir_node *insert, ir_mode *mode, ir_node *spill); +ir_node *be_reload(const arch_register_class_t *cls, ir_node *insert, ir_mode *mode, ir_node *spill); enum { be_pos_CopyKeep_op = 0 diff --git a/ir/be/bespill.c b/ir/be/bespill.c index 103c9dca3..6feadd91c 100644 --- a/ir/be/bespill.c +++ b/ir/be/bespill.c @@ -906,7 +906,6 @@ void make_spill_locations_dominate_irn(spill_env_t *env, ir_node *irn) void be_insert_spills_reloads(spill_env_t *env) { - const arch_env_t *arch_env = env->arch_env; const ir_exec_freq *exec_freq = env->exec_freq; spill_info_t *si; ir_nodeset_iterator_t iter; @@ -1009,7 +1008,7 @@ void be_insert_spills_reloads(spill_env_t *env) /* create a reload, use the first spill for now SSA * reconstruction for memory comes below */ assert(si->spills != NULL); - copy = be_reload(arch_env, si->reload_cls, rld->reloader, mode, + copy = be_reload(si->reload_cls, rld->reloader, mode, si->spills->spill); #ifdef FIRM_STATISTICS env->reload_count++; diff --git a/ir/be/bespillremat.c b/ir/be/bespillremat.c index 995ea9745..ed4ba7a02 100644 --- a/ir/be/bespillremat.c +++ b/ir/be/bespillremat.c @@ -3699,7 +3699,6 @@ insert_reload(spill_ilp_t * si, const ir_node * value, ir_node * after) defs_t *defs; ir_node *reload, *spill; - const arch_env_t *arch_env = si->birg->main_env->arch_env; DBG((si->dbg, LEVEL_3, "\t inserting reload for value %+F before %+F\n", value, after)); @@ -3708,7 +3707,7 @@ insert_reload(spill_ilp_t * si, const ir_node * value, ir_node * after) spill = defs->spills; assert(spill && "no spill placed before reload"); - reload = be_reload(arch_env, si->cls, after, get_irn_mode(value), spill); + reload = be_reload(si->cls, after, get_irn_mode(value), spill); /* enter into the linked list */ set_irn_link(reload, defs->remats);