X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeschedregpress.c;h=16364243cf05aafb937da0a27f4f270f00c5ff30;hb=1872920c09708b361d06c0dc9f4c1fd0a03544f5;hp=a7b7ff32c3265457b47c9f7ea8f65a0819fd5f39;hpb=e40b86c4a43453451ebc7f6fbebe0eec338ec650;p=libfirm diff --git a/ir/be/beschedregpress.c b/ir/be/beschedregpress.c index a7b7ff32c..16364243c 100644 --- a/ir/be/beschedregpress.c +++ b/ir/be/beschedregpress.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. * @@ -32,6 +32,7 @@ #include "iredges_t.h" #include "irgwalk.h" +#include "irtools.h" #include "besched_t.h" #include "belistsched.h" @@ -173,13 +174,13 @@ static int compute_max_hops(reg_pressure_selector_env_t *env, ir_node *irn) return res; } -static void *reg_pressure_graph_init(const list_sched_selector_t *vtab, const arch_env_t *arch_env, ir_graph *irg) +static void *reg_pressure_graph_init(const list_sched_selector_t *vtab, const be_irg_t *birg) { reg_pressure_main_env_t *main_env = xmalloc(sizeof(main_env[0])); - main_env->arch_env = arch_env; + main_env->arch_env = be_get_birg_arch_env(birg); main_env->vtab = vtab; - irg_walk_graph(irg, firm_clear_link, NULL, NULL); + irg_walk_graph(be_get_birg_irg(birg), firm_clear_link, NULL, NULL); return main_env; } @@ -318,7 +319,7 @@ static ir_node *reg_pressure_select(void *block_env, ir_nodeset_t *ready_set, return res; } -static const list_sched_selector_t reg_pressure_selector_struct = { +const list_sched_selector_t reg_pressure_selector = { reg_pressure_graph_init, reg_pressure_block_init, reg_pressure_select, @@ -330,5 +331,3 @@ static const list_sched_selector_t reg_pressure_selector_struct = { reg_pressure_block_free, free }; - -const list_sched_selector_t *reg_pressure_selector = ®_pressure_selector_struct;