*/
/**
- * Trivial node selector.
- * @author Matthias Braun
- * @date 29.08.2006
- * @cvs-id $Id$
+ * @file
+ * @brief Random node selector.
+ * @author Matthias Braun
+ * @date 29.08.2006
+ * @version $Id$
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
const arch_env_t *arch_env = block_env;
ir_node *irn = NULL;
int only_branches_left = 1;
+ (void) live_set;
/* assure that branches and constants are executed last */
ir_nodeset_iterator_init(&iter, ready_set);
}
}
- if(only_branches_left) {
+ if (only_branches_left) {
/* at last: schedule branches */
ir_nodeset_iterator_init(&iter, ready_set);
irn = ir_nodeset_iterator_next(&iter);
} else {
do {
- // take 1 random node
+ /* take 1 random node */
int n = rand() % ir_nodeset_size(ready_set);
int i = 0;
ir_nodeset_iterator_init(&iter, ready_set);
- while( (irn = ir_nodeset_iterator_next(&iter)) != NULL) {
+ while ((irn = ir_nodeset_iterator_next(&iter)) != NULL) {
if(i == n) {
break;
}
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 arch_env_t *arch_env, ir_graph *irg)
{
+ (void) vtab;
+ (void) irg;
/* 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 ... */
return (void *)arch_env;
}
-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;
}