summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bepbqpcoloring.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2012-12-14 09:28:56 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2012-12-15 00:09:50 +0100
commitd6ad56f1135216a000cb556c5a32c95e66883cd7 (patch)
treeac4260155f29a173c942b6a2d72808427f636df7 /ir/be/bepbqpcoloring.c
parentf7ee5f2c535d6650ecef9af8653dcbf683cc9db2 (diff)
besched: Add and use sched_foreach_safe().
Diffstat (limited to 'ir/be/bepbqpcoloring.c')
-rw-r--r--ir/be/bepbqpcoloring.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/ir/be/bepbqpcoloring.c b/ir/be/bepbqpcoloring.c
index cdc99e1..2411b28 100644
--- a/ir/be/bepbqpcoloring.c
+++ b/ir/be/bepbqpcoloring.c
@@ -540,15 +540,11 @@ static void create_pbqp_coloring_instance(ir_node *block, void *data)
static void insert_perms(ir_node *block, void *data)
{
be_chordal_env_t *env = (be_chordal_env_t*)data;
- ir_node *irn;
- for (irn = sched_first(block); !sched_is_end(irn);) {
- ir_node *const next = sched_next(irn);
- be_insn_t * insn = be_scan_insn(env, irn);
+ sched_foreach_safe(block, irn) {
+ be_insn_t *insn = be_scan_insn(env, irn);
if (insn)
pre_process_constraints(env, &insn);
-
- irn = next;
}
}