- moved peephole_IncSP_IncSP() to bepeephole.c, as this is a generic function and...
[libfirm] / ir / be / beschedrand.c
index bfaf5fb..3388907 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -77,21 +77,23 @@ static ir_node *random_select(void *block_env, ir_nodeset_t *ready_set,
        return irn;
 }
 
-static void *random_init_graph(const list_sched_selector_t *vtab, const arch_env_t *arch_env, ir_graph *irg)
+static void *random_init_graph(const list_sched_selector_t *vtab, const be_irg_t *birg)
 {
+       (void) vtab;
        /* Using time(NULL) as a seed here gives really random results,
           but is NOT deterministic which makes debugging impossible.
           Moreover no-one want non-deterministic compilers ... */
        srand(0x4711);
-       return (void *)arch_env;
+       return (void *) be_get_birg_arch_env(birg);
 }
 
-static void *random_init_block(void *graph_env, ir_node *bl)
+static void *random_init_block(void *graph_env, ir_node *block)
 {
+       (void) block;
        return graph_env;
 }
 
-static const list_sched_selector_t random_selector_struct = {
+const list_sched_selector_t random_selector = {
        random_init_graph,
        random_init_block,
        random_select,
@@ -103,5 +105,3 @@ static const list_sched_selector_t random_selector_struct = {
        NULL,                /* finish_block */
        NULL                 /* finish_graph */
 };
-
-const list_sched_selector_t *random_selector = &random_selector_struct;