Commit 95d5fa3e authored by Matthias Braun's avatar Matthias Braun
Browse files

free values again if we know we don't need them anymore

[r26343]
parent 83333040
......@@ -607,7 +607,6 @@ static void permutate_values(ir_nodeset_t *live_nodes, ir_node *before,
ins[old_reg] = value;
++n_used[old_reg];
//free_reg_of_value(value);
/* free occupation infos, we'll add the values back later */
if (live_nodes != NULL) {
......@@ -647,9 +646,13 @@ static void permutate_values(ir_nodeset_t *live_nodes, ir_node *before,
/* old register has 1 user less, permutation is resolved */
assert(arch_register_get_index(arch_get_irn_register(src)) == old_r);
permutation[r] = r;
assert(n_used[old_r] > 0);
--n_used[old_r];
permutation[r] = r;
if (n_used[old_r] == 0) {
free_reg_of_value(src);
}
/* advance or jump back (if this copy enabled another copy) */
if (old_r < r && n_used[old_r] == 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment