summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bepbqpcoloring.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2018-03-02 08:52:51 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2018-03-03 08:47:46 +0100
commit75d1c706daa017c2a04e84aae3ba73e360ca0a2e (patch)
treecc52a9d75fbf1c5069632082a2cfac998ddf42ed /ir/be/bepbqpcoloring.c
parent1e04ef5c3622c6ae8d205398fe42bf3a08520d9e (diff)
be: Generalize set_irn_col() to arch_set_irn_register_idx() and use it elsewhere, too.
There is no need to pass the register class as parameter, because the node knows the register class.
Diffstat (limited to 'ir/be/bepbqpcoloring.c')
-rw-r--r--ir/be/bepbqpcoloring.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ir/be/bepbqpcoloring.c b/ir/be/bepbqpcoloring.c
index db3a0d4..b9de189 100644
--- a/ir/be/bepbqpcoloring.c
+++ b/ir/be/bepbqpcoloring.c
@@ -652,11 +652,9 @@ static void be_pbqp_coloring(be_chordal_env_t *env)
/* assign colors */
deq_foreach_pointer(&pbqp_alloc_env.rpeo, pbqp_node_t, node) {
- ir_node *irn = get_idx_irn(irg, node->index);
- num color = get_node_solution(pbqp_alloc_env.pbqp_inst, node->index);
- const arch_register_t *reg = arch_register_for_index(cls, color);
-
- arch_set_irn_register(irn, reg);
+ ir_node *const irn = get_idx_irn(irg, node->index);
+ num const color = get_node_solution(pbqp_alloc_env.pbqp_inst, node->index);
+ arch_set_irn_register_idx(irn, color);
}