summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMaximilian Stemmer-Grabow <mail@mxsg.de>2021-06-11 15:12:03 +0200
committerAndreas Fried <andreas.fried@kit.edu>2021-12-02 12:57:28 +0100
commit583ffded62f4c03a42f5fb409fb5946c777eff6d (patch)
tree8bc03f38843e119177bbfede5ed4f6192ced71ee
parent723c902f8f40ce7e8b23b811c57c3738b862e439 (diff)
Incorporate compressible use count in adjustment of register costs
-rw-r--r--ir/be/becopyheur4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ir/be/becopyheur4.c b/ir/be/becopyheur4.c
index 7ba3a70..a65e4c2 100644
--- a/ir/be/becopyheur4.c
+++ b/ir/be/becopyheur4.c
@@ -627,7 +627,7 @@ static void aff_chunk_assure_weight(co_mst_env_t *env, aff_chunk_t *c)
// by the chosen register themselves as well as the number of other nodes that rely on the value from
// the node itself to be in a compressible register to be compressed themselves.
- double compressibility_factor = register_restr_count / (double)ARR_LEN(c->n);
+ double compressibility_factor = (register_restr_uses + register_restr_count) / (double)ARR_LEN(c->n);
// DB((dbg, LEVEL_1, "Compressibility factor: %f, length: %d\n", compressibility_factor, ARR_LEN(c->n)));
@@ -1160,7 +1160,7 @@ static void color_aff_chunk(co_mst_env_t *env, aff_chunk_t *c)
}
}
- double compressibility_factor = c->comp_reg_restr_count / (double)ARR_LEN(c->n);
+ double compressibility_factor = (c->comp_reg_restr_count + c->comp_reg_use_count) / (double)ARR_LEN(c->n);
DB((dbg, LEVEL_4, "Coloring chunk #%u, costs are (col: adjusted from -> to): ", c->id));