summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bestate.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2011-04-01 10:17:03 +0200
committerMatthias Braun <matze@braunis.de>2011-04-08 14:57:25 +0200
commit939b0af78227f2d14a4362a1b5518fd9e05b1053 (patch)
tree08716fdf5242f46f6bdbbd28bf0c5d099e1345bb /ir/be/bestate.c
parent7ddfd63ef9928a20b1f83134f6f627a0c0bb3ecd (diff)
Another rewrite of prolog/epilog handling: Delay their creation until after register allocation
Diffstat (limited to 'ir/be/bestate.c')
-rw-r--r--ir/be/bestate.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/ir/be/bestate.c b/ir/be/bestate.c
index 32d0c14..90f65be 100644
--- a/ir/be/bestate.c
+++ b/ir/be/bestate.c
@@ -135,8 +135,7 @@ static spill_info_t *create_spill(minibelady_env_t *env, ir_node *state, int for
do {
after = next;
next = sched_next(after);
- } while (is_Proj(next) || is_Phi(next) || be_is_Keep(next)
- || (arch_irn_get_flags(next) & arch_irn_flags_prolog));
+ } while (is_Proj(next) || is_Phi(next) || be_is_Keep(next));
} else {
after = state;
}
@@ -352,17 +351,6 @@ static block_info_t *compute_block_start_state(minibelady_env_t *env, ir_node *b
return block_info;
}
-static ir_node *get_reload_point(ir_node *before)
-{
- while (true) {
- ir_node *prev = sched_prev(before);
- if (! (arch_irn_get_flags(prev) & arch_irn_flags_epilog))
- break;
- before = prev;
- }
- return before;
-}
-
/**
* For the given block @p block, decide for each values
* whether it is used from a register or is reloaded
@@ -419,7 +407,7 @@ 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) {
- ir_node *before = get_reload_point(node);
+ ir_node *before = node;
DBG((dbg, LEVEL_3, "\t... reloading %+F\n", need_val));
create_reload(env, need_val, before, current_state);
current_state = need_val;