projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
beabi requires out edges
[libfirm]
/
ir
/
be
/
bestate.c
diff --git
a/ir/be/bestate.c
b/ir/be/bestate.c
index
b21fee4
..
69e3e09
100644
(file)
--- a/
ir/be/bestate.c
+++ b/
ir/be/bestate.c
@@
-183,7
+183,8
@@
static void spill_phi(minibelady_env_t *env, ir_node *phi)
DBG((dbg, LEVEL_2, "\tcreate Phi-M for %+F\n", phi));
/* create a Phi-M */
DBG((dbg, LEVEL_2, "\tcreate Phi-M for %+F\n", phi));
/* create a Phi-M */
- spill_info->spill = new_r_Phi(block, arity, in, mode_M);
+ spill_info->spill = be_new_Phi(block, arity, in, mode_M, NULL);
+ sched_add_after(block, spill_info->spill);
if (spill_to_kill != NULL) {
exchange(spill_to_kill, spill_info->spill);
if (spill_to_kill != NULL) {
exchange(spill_to_kill, spill_info->spill);
@@
-406,8
+407,9
@@
static void belady(minibelady_env_t *env, ir_node *block)
}
/* create a reload to match state if necessary */
if (need_val != NULL && need_val != current_state) {
}
/* create a reload to match state if necessary */
if (need_val != NULL && need_val != current_state) {
+ ir_node *before = node;
DBG((dbg, LEVEL_3, "\t... reloading %+F\n", need_val));
DBG((dbg, LEVEL_3, "\t... reloading %+F\n", need_val));
- create_reload(env, need_val,
nod
e, current_state);
+ create_reload(env, need_val,
befor
e, current_state);
current_state = need_val;
}
current_state = need_val;
}
@@
-600,7
+602,7
@@
void be_assure_state(ir_graph *irg, const arch_register_t *reg, void *func_env,
obstack_free(&env.obst, NULL);
}
obstack_free(&env.obst, NULL);
}
-BE_REGISTER_MODULE_CONSTRUCTOR(be_init_state)
;
+BE_REGISTER_MODULE_CONSTRUCTOR(be_init_state)
void be_init_state(void)
{
FIRM_DBG_REGISTER(dbg, "firm.be.state");
void be_init_state(void)
{
FIRM_DBG_REGISTER(dbg, "firm.be.state");