X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbespillbelady3.c;h=0dc93b4035a3df2db156343e9c30766980af5b5f;hb=847f1ac0bbca120c8238400e68cd00d52723bdca;hp=5d90cc468da990c062a643891302d8322f33df10;hpb=d935aa267d00966c360931d2f0f43008030c0592;p=libfirm diff --git a/ir/be/bespillbelady3.c b/ir/be/bespillbelady3.c index 5d90cc468..0dc93b403 100644 --- a/ir/be/bespillbelady3.c +++ b/ir/be/bespillbelady3.c @@ -29,9 +29,7 @@ * - merge multiple start worksets of blocks ~ok * - how to and when to do the tentative phase... */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include @@ -95,7 +93,6 @@ struct block_info_t { worklist_t *end_worklist; }; -static const arch_env_t *arch_env; static const arch_register_class_t *cls; static struct obstack obst; static spill_env_t *senv; @@ -195,7 +192,7 @@ static void fill_and_activate_worklist(worklist_t *new_worklist, value = get_Phi_pred(value, succ_pos); /* can happen for unknown phi preds */ - if (!arch_irn_consider_in_reg_alloc(arch_env, cls, value)) + if (!arch_irn_consider_in_reg_alloc(cls, value)) continue; } @@ -399,7 +396,7 @@ static void val_used(worklist_t *worklist, ir_node *value, ir_node *sched_point) /* already in the worklist? move around, otherwise add at back */ worklist_entry_t *entry = get_irn_link(value); - assert(arch_irn_consider_in_reg_alloc(arch_env, cls, value)); + assert(arch_irn_consider_in_reg_alloc(cls, value)); if (worklist_contains(value)) { assert(entry != NULL); @@ -464,7 +461,7 @@ static void do_spilling(ir_node *block, worklist_t *worklist) if (worklist_contains(node2)) continue; - if (!arch_irn_consider_in_reg_alloc(arch_env, cls, node2)) + if (!arch_irn_consider_in_reg_alloc(cls, node2)) continue; if (!tentative_mode) @@ -481,7 +478,7 @@ static void do_spilling(ir_node *block, worklist_t *worklist) foreach_out_edge(node, edge) { ir_node *proj = get_edge_src_irn(edge); - if (!arch_irn_consider_in_reg_alloc(arch_env, cls, proj)) + if (!arch_irn_consider_in_reg_alloc(cls, proj)) continue; if (worklist_contains(proj)) { worklist_remove(worklist, proj); @@ -489,7 +486,7 @@ static void do_spilling(ir_node *block, worklist_t *worklist) ++n_defs; } } - } else if (arch_irn_consider_in_reg_alloc(arch_env, cls, node)) { + } else if (arch_irn_consider_in_reg_alloc(cls, node)) { if (worklist_contains(node)) { worklist_remove(worklist, node); } else { @@ -505,7 +502,7 @@ static void do_spilling(ir_node *block, worklist_t *worklist) for(i = 0; i < arity; ++i) { ir_node *use = get_irn_n(node, i); - if (!arch_irn_consider_in_reg_alloc(arch_env, cls, use)) + if (!arch_irn_consider_in_reg_alloc(cls, use)) continue; val_used(worklist, use, node); @@ -1002,7 +999,7 @@ static void fix_block_borders(ir_node *block, void *data) value = get_irn_n(value, i); /* we might have unknowns as argument for the phi */ - if (!arch_irn_consider_in_reg_alloc(arch_env, cls, value)) + if (!arch_irn_consider_in_reg_alloc(cls, value)) continue; } @@ -1030,7 +1027,6 @@ static void be_spill_belady3(be_irg_t *birg, const arch_register_class_t *ncls) return; worklist_visited = 0; - arch_env = be_get_birg_arch_env(birg); exec_freq = be_get_birg_exec_freq(birg); be_clear_links(irg);