summaryrefslogtreecommitdiffhomepage
path: root/ir/be/besched.c
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-01-10 12:57:48 +0100
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-01-10 13:45:22 +0100
commit17f1b65472a9207091653b40a081c974067e8bf0 (patch)
treed2d83df0ecf1ff965ce189183596b14d29490119 /ir/be/besched.c
parent58e07445ee5c9c92a4ca4230e84b90f34bdd99b1 (diff)
besched: Add be_move_after_schedule_first() to place nodes after schedule_first nodes.
Diffstat (limited to 'ir/be/besched.c')
-rw-r--r--ir/be/besched.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ir/be/besched.c b/ir/be/besched.c
index 8921dac..7364361 100644
--- a/ir/be/besched.c
+++ b/ir/be/besched.c
@@ -166,3 +166,13 @@ void be_init_sched(void)
be_add_module_list_opt(be_grp, "scheduler", "scheduling algorithm",
&schedulers, (void**)&scheduler);
}
+
+ir_node *be_move_after_schedule_first(ir_node *node)
+{
+ for (;;) {
+ ir_node *const next = sched_next(node);
+ if (!arch_irn_is(next, schedule_first))
+ return node;
+ node = next;
+ }
+}