summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMaximilian Stemmer-Grabow <mail@mxsg.de>2021-06-10 17:04:13 +0200
committerAndreas Fried <andreas.fried@kit.edu>2021-12-02 12:57:28 +0100
commit9b8c0849f8dbe59779a2f2f2eba582ae25cf9974 (patch)
tree7c0596d68060f882e34ccf98f139903780bb1c52
parent29792094da31edcf4f341a03f4977140b0e364e3 (diff)
Alter register cost adjustment for incompressible registers
-rw-r--r--ir/be/becopyheur4.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ir/be/becopyheur4.c b/ir/be/becopyheur4.c
index 60dded9..3e3857d 100644
--- a/ir/be/becopyheur4.c
+++ b/ir/be/becopyheur4.c
@@ -596,7 +596,8 @@ static void aff_chunk_assure_weight(co_mst_env_t *env, aff_chunk_t *c)
// If the register is not compressible, adjust the cost upwards according to the compressibility factor,
// up to a maximum set by the compressibility influence parameter.
if (!bitset_is_set(env->compressible_regs, i)) {
- adjusted_cost = prior_cost * compressibility_factor * compressibility_influence;
+ adjusted_cost += prior_cost * compressibility_factor * compressibility_influence;
+ DB((dbg, LEVEL_4, "(%u: %d -> %d)", i, prior_cost, adjusted_cost));
}
c->color_affinity[i].cost = adjusted_cost;
@@ -1129,7 +1130,7 @@ static void color_aff_chunk(co_mst_env_t *env, aff_chunk_t *c)
// If the register is not compressible, adjust the cost upwards according to the compressibility factor,
// up to a maximum set by the compressibility influence parameter.
if (!bitset_is_set(env->compressible_regs, i)) {
- adjusted_cost = prior_cost * compressibility_factor * compressibility_influence;
+ adjusted_cost += prior_cost * compressibility_factor * compressibility_influence;
}
order[i].col = i;