Just use sched_next().
}
}
-static ir_node *handle_constraints(be_chordal_alloc_env_t *alloc_env,
+static void handle_constraints(be_chordal_alloc_env_t *alloc_env,
ir_node *irn)
{
int n_regs;
be_chordal_env_t *env = alloc_env->chordal_env;
void *base = obstack_base(env->obst);
be_insn_t *insn = be_scan_insn(env, irn);
- ir_node *res = insn->next_insn;
bipartite_t *bp;
if (insn->pre_colored) {
end:
obstack_free(env->obst, base);
- return res;
}
/**
ir_node *irn;
for (irn = sched_first(bl); !sched_is_end(irn);) {
- irn = handle_constraints(env, irn);
+ ir_node *const next = sched_next(irn);
+ handle_constraints(env, irn);
+ irn = next;
}
}
be_insn_t *insn = OALLOCZ(obst, be_insn_t);
- insn->irn = irn;
- insn->next_insn = sched_next(irn);
+ insn->irn = irn;
if (get_irn_mode(irn) == mode_T) {
ir_node *p;
int n_ops; /**< length of the ops array */
int use_start; /**< entries [0-use_start) in ops are defs,
[use_start-n_ops) uses */
- ir_node *next_insn; /**< next instruction in schedule */
ir_node *irn; /**< ir_node of the instruction */
unsigned has_constraints : 1; /**< in_constraints or out_constraints true */
unsigned pre_colored : 1; /**< all defined values already have a register assigned */
ir_node *irn;
for (irn = sched_first(block); !sched_is_end(irn);) {
- be_insn_t *insn = be_scan_insn(env, irn);
- irn = insn->next_insn;
+ ir_node *const next = sched_next(irn);
+ be_insn_t * insn = be_scan_insn(env, irn);
+ if (insn->has_constraints)
+ pre_process_constraints(env, &insn);
- if (!insn->has_constraints)
- continue;
-
- pre_process_constraints(env, &insn);
+ irn = next;
}
}