Commit e4654328 authored by Michael Beck's avatar Michael Beck
Browse files

simplified code

[r15026]
parent 2ea7f634
...@@ -668,23 +668,24 @@ static ir_node *handle_constraints(be_chordal_alloc_env_t *alloc_env, ...@@ -668,23 +668,24 @@ static ir_node *handle_constraints(be_chordal_alloc_env_t *alloc_env,
/* Assign colors obtained from the matching. */ /* Assign colors obtained from the matching. */
for(i = 0; i < n_alloc; ++i) { for(i = 0; i < n_alloc; ++i) {
const arch_register_t *reg; const arch_register_t *reg;
ir_node *nodes[2]; ir_node *irn;
int j;
assert(assignment[i] >= 0 && "there must have been a register assigned"); assert(assignment[i] >= 0 && "there must have been a register assigned");
reg = arch_register_for_index(env->cls, assignment[i]); reg = arch_register_for_index(env->cls, assignment[i]);
assert(! (reg->type & arch_register_type_ignore));
nodes[0] = alloc_nodes[i]; irn = alloc_nodes[i];
nodes[1] = pmap_get(partners, alloc_nodes[i]); if (irn != NULL) {
arch_set_irn_register(aenv, irn, reg);
for(j = 0; j < 2; ++j) { (void) pset_hinsert_ptr(alloc_env->pre_colored, irn);
if(!nodes[j]) DBG((dbg, LEVEL_2, "\tsetting %+F to register %s\n", irn, reg->name));
continue; }
assert(! (reg->type & arch_register_type_ignore)); irn = pmap_get(partners, alloc_nodes[i]);
arch_set_irn_register(aenv, nodes[j], reg); if (irn != NULL) {
(void) pset_hinsert_ptr(alloc_env->pre_colored, nodes[j]); arch_set_irn_register(aenv, irn, reg);
DBG((dbg, LEVEL_2, "\tsetting %+F to register %s\n", nodes[j], reg->name)); (void) pset_hinsert_ptr(alloc_env->pre_colored, irn);
DBG((dbg, LEVEL_2, "\tsetting %+F to register %s\n", irn, reg->name));
} }
} }
......
Supports Markdown
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