summaryrefslogtreecommitdiffhomepage
path: root/ir/be/belistsched.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2010-07-02 18:58:20 +0200
committerMatthias Braun <matze@braunis.de>2010-07-02 18:58:20 +0200
commit65a52a96e8ab7ed601d7f98c516d37c46b674b4a (patch)
treea292f5f42876918c2ae2a907bb84f62f97c5d541 /ir/be/belistsched.c
parent7a178059678ff6c6094a7cd8fac5644367417102 (diff)
convert remaining APIs from be_irg_t* to ir_graph*
[r27693]
Diffstat (limited to 'ir/be/belistsched.c')
-rw-r--r--ir/be/belistsched.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/ir/be/belistsched.c b/ir/be/belistsched.c
index 29cf285..4690990 100644
--- a/ir/be/belistsched.c
+++ b/ir/be/belistsched.c
@@ -544,17 +544,13 @@ static void list_sched_block(ir_node *block, void *env_ptr)
}
/* List schedule a graph. */
-void list_sched(be_irg_t *birg, be_options_t *be_opts)
+void list_sched(ir_graph *irg)
{
- ir_graph *irg = birg->irg;
-
int num_nodes;
sched_env_t env;
mris_env_t *mris = NULL;
list_sched_selector_t sel;
- (void)be_opts;
-
/* Select a scheduler based on backend options */
switch (list_sched_options.select) {
case BE_SCHED_SELECT_TRIVIAL: sel = trivial_selector; break;
@@ -580,10 +576,10 @@ void list_sched(be_irg_t *birg, be_options_t *be_opts)
switch (list_sched_options.prep) {
case BE_SCHED_PREP_MRIS:
- mris = be_sched_mris_preprocess(birg);
+ mris = be_sched_mris_preprocess(irg);
break;
case BE_SCHED_PREP_RSS:
- rss_schedule_preparation(birg);
+ rss_schedule_preparation(irg);
break;
default:
break;
@@ -593,13 +589,13 @@ void list_sched(be_irg_t *birg, be_options_t *be_opts)
/* initialize environment for list scheduler */
memset(&env, 0, sizeof(env));
- env.selector = arch_env_get_list_sched_selector(birg->main_env->arch_env, &sel);
+ env.selector = arch_env_get_list_sched_selector(be_get_irg_arch_env(irg), &sel);
env.sched_info = NEW_ARR_F(sched_irn_t, num_nodes);
memset(env.sched_info, 0, num_nodes * sizeof(env.sched_info[0]));
if (env.selector->init_graph)
- env.selector_env = env.selector->init_graph(env.selector, birg);
+ env.selector_env = env.selector->init_graph(env.selector, irg);
/* Schedule each single block. */
irg_block_walk_graph(irg, list_sched_block, NULL, &env);
@@ -614,17 +610,12 @@ void list_sched(be_irg_t *birg, be_options_t *be_opts)
}
/* List schedule a block. */
-void list_sched_single_block(const be_irg_t *birg, ir_node *block,
- be_options_t *be_opts)
+void list_sched_single_block(ir_graph *irg, ir_node *block)
{
- ir_graph *irg = birg->irg;
-
int num_nodes;
sched_env_t env;
list_sched_selector_t sel;
- (void)be_opts;
-
/* Select a scheduler based on backend options */
switch (list_sched_options.select) {
case BE_SCHED_SELECT_TRIVIAL: sel = trivial_selector; break;
@@ -645,13 +636,13 @@ void list_sched_single_block(const be_irg_t *birg, ir_node *block,
/* initialize environment for list scheduler */
memset(&env, 0, sizeof(env));
- env.selector = arch_env_get_list_sched_selector(birg->main_env->arch_env, &sel);
+ env.selector = arch_env_get_list_sched_selector(be_get_irg_arch_env(irg), &sel);
env.sched_info = NEW_ARR_F(sched_irn_t, num_nodes);
memset(env.sched_info, 0, num_nodes * sizeof(env.sched_info[0]));
if (env.selector->init_graph)
- env.selector_env = env.selector->init_graph(env.selector, birg);
+ env.selector_env = env.selector->init_graph(env.selector, irg);
/* Schedule block. */
list_sched_block(block, &env);