X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbelower.c;h=8064401f54b7b7381f6f878be906d65b58f18190;hb=e6ad8ee4680a88db8652483c2c6f3124f3d9a888;hp=45ea686bc1df9e65207d2d6a2b0fbd3be0199c11;hpb=5e1f95efc1491481487ba22482422b6d6f42bcdb;p=libfirm diff --git a/ir/be/belower.c b/ir/be/belower.c index 45ea686bc..8064401f5 100644 --- a/ir/be/belower.c +++ b/ir/be/belower.c @@ -463,49 +463,6 @@ static void lower_perm_node(ir_node *irn, void *walk_env) { -/** - * Calls the backend code generator functions to lower Spill and - * Reload nodes into Store and Load. The backend is fully responsible - * for creating the new nodes and setting their input correct. - * Note: The caller of this has to make sure that irn is a Spill - * or Reload! - * - * @param irn The Spill/Reload node - * @param walk_env The walker environment - */ -static void lower_spill_reload(ir_node *irn, void *walk_env) { - lower_env_t *env = walk_env; - arch_code_generator_t *cg = env->chord_env->birg->cg; - const arch_env_t *aenv = env->chord_env->birg->main_env->arch_env; - ir_node *res = NULL; - ir_node *sched_point; - - if (be_is_Spill(irn) && cg->impl->lower_spill) { - res = cg->impl->lower_spill(cg, irn); - } - else if (be_is_Reload(irn) && cg->impl->lower_reload) { - res = cg->impl->lower_reload(cg, irn); - if (res && res != irn) { - /* copy the result register from the reload to the load */ - arch_set_irn_register(aenv, res, arch_get_irn_register(aenv, irn)); - } - } - - if (res && res != irn) { - sched_point = sched_prev(irn); - sched_remove(irn); - exchange(irn, res); - sched_add_after(sched_point, res); - } - else { - DBG((env->dbg_module, LEVEL_1, "node %+F not lowered\n", irn)); - } - - return; -} - - - /** * Calls the corresponding lowering function for the node. * @@ -520,9 +477,6 @@ static void lower_nodes_after_ra_walker(ir_node *irn, void *walk_env) { if (is_Perm(arch_env, irn)) { lower_perm_node(irn, walk_env); } - else if (be_is_Spill(irn) || be_is_Reload(irn)) { - lower_spill_reload(irn, walk_env); - } } return;