-const list_sched_selector_t random_selector = {
- random_init_graph,
- random_init_block,
- random_select,
- NULL, /* to_appear_in_schedule */
- NULL, /* node_ready */
- NULL, /* node_selected */
- NULL, /* exectime */
- NULL, /* latency */
- NULL, /* finish_block */
- NULL /* finish_graph */
-};
+static void sched_random(ir_graph *irg)
+{
+ static const list_sched_selector_t random_selector = {
+ random_init_graph,
+ random_init_block,
+ random_select,
+ NULL, /* node_ready */
+ NULL, /* node_selected */
+ NULL, /* finish_block */
+ NULL /* finish_graph */
+ };
+ be_list_sched_graph(irg, &random_selector);
+}
+
+BE_REGISTER_MODULE_CONSTRUCTOR(be_init_sched_rand)
+void be_init_sched_rand(void)
+{
+ be_register_scheduler("random", sched_random);
+}