X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbessadestrsimple.c;h=c7dbcf7da65a5e5b7bb34f091a24daf7806ecb8e;hb=c1fdf770d4d000dd5cf22daead32369342c5f5d1;hp=185a0185a75926fc868ca51018441151a665479a;hpb=4f403660a6fcd21191bae7cf816bcbd013b28de6;p=libfirm diff --git a/ir/be/bessadestrsimple.c b/ir/be/bessadestrsimple.c index 185a0185a..c7dbcf7da 100644 --- a/ir/be/bessadestrsimple.c +++ b/ir/be/bessadestrsimple.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -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);