projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update the MIPS scheduler by removing stale arch_env uses.
[libfirm]
/
ir
/
be
/
bespillbelady3.c
diff --git
a/ir/be/bespillbelady3.c
b/ir/be/bespillbelady3.c
index
6135e99
..
0dc93b4
100644
(file)
--- 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...
*/
* - merge multiple start worksets of blocks ~ok
* - how to and when to do the tentative phase...
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
#include "config.h"
-#endif
#include <stdbool.h>
#include <stdbool.h>
@@
-95,7
+93,6
@@
struct block_info_t {
worklist_t *end_worklist;
};
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;
static const arch_register_class_t *cls;
static struct obstack obst;
static spill_env_t *senv;
@@
-195,11
+192,11
@@
static void fill_and_activate_worklist(worklist_t *new_worklist,
value = get_Phi_pred(value, succ_pos);
/* can happen for unknown phi preds */
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;
}
continue;
}
- if (irn_visited(value))
+ if (irn_visited
_else_mark
(value))
continue;
new_entry = obstack_alloc(&obst, sizeof(new_entry[0]));
continue;
new_entry = obstack_alloc(&obst, sizeof(new_entry[0]));
@@
-215,7
+212,6
@@
static void fill_and_activate_worklist(worklist_t *new_worklist,
list_add_tail(&new_entry->head, &new_worklist->live_values);
++n_live_values;
list_add_tail(&new_entry->head, &new_worklist->live_values);
++n_live_values;
- mark_irn_visited(value);
set_irn_link(value, new_entry);
new_worklist->n_live_values++;
}
set_irn_link(value, new_entry);
new_worklist->n_live_values++;
}
@@
-400,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);
/* 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);
if (worklist_contains(value)) {
assert(entry != NULL);
@@
-465,7
+461,7
@@
static void do_spilling(ir_node *block, worklist_t *worklist)
if (worklist_contains(node2))
continue;
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)
continue;
if (!tentative_mode)
@@
-482,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);
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);
continue;
if (worklist_contains(proj)) {
worklist_remove(worklist, proj);
@@
-490,7
+486,7
@@
static void do_spilling(ir_node *block, worklist_t *worklist)
++n_defs;
}
}
++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 {
if (worklist_contains(node)) {
worklist_remove(worklist, node);
} else {
@@
-506,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);
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);
continue;
val_used(worklist, use, node);
@@
-1003,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 */
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;
}
continue;
}
@@
-1031,7
+1027,6
@@
static void be_spill_belady3(be_irg_t *birg, const arch_register_class_t *ncls)
return;
worklist_visited = 0;
return;
worklist_visited = 0;
- arch_env = be_get_birg_arch_env(birg);
exec_freq = be_get_birg_exec_freq(birg);
be_clear_links(irg);
exec_freq = be_get_birg_exec_freq(birg);
be_clear_links(irg);