summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bespillslots.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2013-06-27 14:44:17 +0200
committerMatthias Braun <matze@braunis.de>2013-06-27 14:44:21 +0200
commit9ebabcf3362f7d458873dcf486f8423ed4754050 (patch)
treeed0ed9657fd5aa71d019723ba0a4bfa0f9c35c5e /ir/be/bespillslots.c
parent4e36e86b7ae7850168faf21d14e925d32462db1b (diff)
refactoring of returns_twice=>no_coalescing rule
This mainly adds comments explaining the situation and avoids an extra graph walk.
Diffstat (limited to 'ir/be/bespillslots.c')
-rw-r--r--ir/be/bespillslots.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/ir/be/bespillslots.c b/ir/be/bespillslots.c
index 64b538e..2eaf23f 100644
--- a/ir/be/bespillslots.c
+++ b/ir/be/bespillslots.c
@@ -60,6 +60,7 @@ struct be_fec_env_t {
set_frame_entity_func set_frame_entity;
bool at_begin; /**< frame entities should be allocate at
the beginning of the stackframe */
+ bool coalescing_forbidden;
};
/** Compare 2 affinity edges (used in quicksort) */
@@ -673,10 +674,14 @@ void be_free_frame_entity_coalescer(be_fec_env_t *env)
free(env);
}
+void be_forbid_coalescing(be_fec_env_t *env)
+{
+ env->coalescing_forbidden = true;
+}
+
void be_assign_entities(be_fec_env_t *env,
set_frame_entity_func set_frame_entity,
- bool alloc_entities_at_begin,
- bool coalescing_allowed)
+ bool alloc_entities_at_begin)
{
env->set_frame_entity = set_frame_entity;
env->at_begin = alloc_entities_at_begin;
@@ -685,7 +690,7 @@ void be_assign_entities(be_fec_env_t *env,
stat_ev_dbl("spillslots", ARR_LEN(env->spills));
}
- if (be_coalesce_spill_slots && coalescing_allowed) {
+ if (be_coalesce_spill_slots && !env->coalescing_forbidden) {
do_greedy_coalescing(env);
}