- * will work.
- */
- list_for_each_entry_reverse(border_t, b, head, list) {
- ir_node *irn = b->irn;
- int nr = get_irn_idx(irn);
- int ignore = arch_irn_is_ignore(irn);
-
- /*
- * Assign a color, if it is a local def. Global defs already have a
- * color.
- */
- if (b->is_def && !be_is_live_in(lv, block, irn)) {
- const arch_register_t *reg;
- int col;
-
- if (ignore || pset_find_ptr(alloc_env->pre_colored, irn)) {
- reg = arch_get_irn_register(irn);
+ * will work. */
+ foreach_border_head(head, b) {
+ ir_node *const irn = b->irn;
+ int const nr = get_irn_idx(irn);
+
+ /* Assign a color, if it is a local def. Global defs already have a
+ * color. */
+ if (!b->is_def) {
+ /* Clear the color upon a use. */
+ arch_register_t const *const reg = arch_get_irn_register(irn);
+ assert(reg && "Register must have been assigned");
+ bitset_clear(colors, reg->index);
+ bitset_clear(live, nr);
+ } else if (!be_is_live_in(lv, block, irn)) {
+ int col;
+ arch_register_t const *reg = arch_get_irn_register(irn);
+ if (reg) {