*/
#include "config.h"
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
#include "mips_scheduler.h"
-#include "../besched_t.h"
+#include "../besched.h"
#include "be.h"
#include "../beabi.h"
+#include "../belistsched.h"
#include "iredges.h"
#include "ircons.h"
#include "gen_mips_regalloc_if.h"
list_sched_selector_t mips_sched_selector;
typedef struct {
- const arch_env_t* arch_env;
pset *div_set;
/**
* This array holds an entry for each register that specifies how much cycles
/* Matze: deprecated and totally broken */
#if 0
-static void *mips_scheduler_init_graph(const list_sched_selector_t *vtab, const arch_env_t *arch_env, ir_graph *irg)
+static void *mips_scheduler_init_graph(const list_sched_selector_t *vtab, ir_graph *irg)
{
mips_sched_env_t *sched_env = XMALLOCZ(mips_sched_env_t);
- sched_env->arch_env = arch_env;
sched_env->div_set = new_pset(pset_default_ptr_cmp, 4);
return sched_env;
static ir_node *mips_scheduler_select(void *block_env, nodeset *ready_set, nodeset *live_set)
{
mips_sched_env_t *sched_env = (mips_sched_env_t*) block_env;
- const arch_env_t *arch_env = (const arch_env_t*) sched_env->arch_env;
ir_node *node = NULL;
ir_node *block = sched_env->block;
ir_node *condjmp = NULL;
// test all nodes in the ready set and take the first non-branch that
// is allowed
for (node = nodeset_first(ready_set); node != NULL; node = nodeset_next(ready_set)) {
- if (arch_irn_class_is(arch_env, node, branch)) {
+ if (arch_irn_class_is(node, branch)) {
if (is_irn_forking(node))
condjmp = node;
continue;
return condjmp;
}
node = nodeset_first(ready_set);
- assert(arch_irn_class_is(arch_env, node, branch));
+ assert(arch_irn_class_is(node, branch));
nodeset_break(ready_set);
return node;
}