X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbessadestrsimple.c;h=c7dbcf7da65a5e5b7bb34f091a24daf7806ecb8e;hb=70481aa342e22f5f285dc863b366a56393d888af;hp=1068a42b70dc6fc4cbf67911f51f674b57af70a6;hpb=1ce363f80e6a204d4011f85813362d9bd1d0e7e4;p=libfirm diff --git a/ir/be/bessadestrsimple.c b/ir/be/bessadestrsimple.c index 1068a42b7..c7dbcf7da 100644 --- a/ir/be/bessadestrsimple.c +++ b/ir/be/bessadestrsimple.c @@ -26,9 +26,7 @@ */ #ifdef NOT_PORTED -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include #include @@ -38,7 +36,6 @@ #include "pset.h" #include "pmap.h" #include "bitset.h" -#include "xmalloc.h" #include "irprintf_t.h" #include "irnode_t.h" @@ -64,7 +61,6 @@ typedef struct _ssa_destr_env_t { ir_graph *irg; const arch_register_class_t *cls; - const arch_env_t *aenv; set *vars; } ssa_destr_env_t; @@ -164,7 +160,7 @@ static void values_to_vars(ir_node *irn, void *env) { int nr, i, build_vals = 0; ir_node **vals; - if (arch_get_irn_reg_class(sde->aenv, irn, -1) == NULL) + if (arch_get_irn_reg_class(irn, -1) == NULL) return; vals = get_phi_class(pc, irn); @@ -241,7 +237,7 @@ static ir_node *insert_copies(ssa_destr_env_t *sde, const arch_register_class_t /* In case this is a 'normal' phi we insert at the * end of the pred block before cf nodes */ - last_cpy = sched_skip(pred_blk, 0, sched_skip_cf_predicator, (void *)sde->aenv); + last_cpy = sched_skip(pred_blk, 0, sched_skip_cf_predicator, NULL); last_cpy = sched_next(last_cpy); /* If we detect a loop stop recursion. */ @@ -298,21 +294,21 @@ static void ssa_destr_simple_walker(ir_node *blk, void *env) { if (!is_Phi(phi)) break; - if (arch_irn_is(sde->aenv, phi, ignore)) + if (arch_irn_is(phi, ignore)) continue; - cls = arch_get_irn_reg_class(sde->aenv, phi, -1); + cls = arch_get_irn_reg_class(phi, -1); insert_copies(sde, cls, phi, pos, phi); } } } -set *be_ssa_destr_simple(ir_graph *irg, const arch_env_t *aenv) { +set *be_ssa_destr_simple(ir_graph *irg) +{ ssa_destr_env_t sde; sde.irg = irg; - sde.aenv = aenv; sde.vars = new_set(compare_var_infos, 16); be_clear_links(irg);