#include <stdlib.h>
-#include "besched_t.h"
+#include "besched.h"
#include "belistsched.h"
#include "belive_t.h"
#include "beutil.h"
-#include "height.h"
+#include "heights.h"
#include "irtools.h"
#include "irgwalk.h"
-#include "benode_t.h"
+#include "benode.h"
#include "array_t.h"
// XXX there is no one time init for schedulers
if (mode == mode_M || mode == mode_X)
return 0;
+ if (mode == mode_T)
+ return 1;
+
if (arch_get_register_req_out(irn)->type & arch_register_req_type_ignore)
return 0;
int i;
ir_node* block = get_nodes_block(irn);
- fc = obstack_alloc(&inst->obst, sizeof(*fc) + sizeof(*fc->costs) * arity);
+ fc = OALLOCF(&inst->obst, flag_and_cost, costs, arity);
fc->no_root = 0;
costs = fc->costs;
last = 0;
for (i = 0; i < arity; ++i) {
ir_node* op = fc->costs[i].irn;
- if (op == last) continue;
- if (get_irn_mode(op) == mode_M) continue;
- if (arch_irn_is_ignore(op)) continue;
+ ir_mode* mode;
+ if (op == last)
+ continue;
+ mode = get_irn_mode(op);
+ if (mode == mode_M)
+ continue;
+ if (mode != mode_T && arch_irn_is_ignore(op))
+ continue;
cost = MAX(fc->costs[i].cost + n_op_res, cost);
last = op;
++n_op_res;
static void normal_sched_block(ir_node* block, void* env)
{
ir_node** roots = get_irn_link(block);
- heights_t* heights = env;
+ ir_heights_t* heights = env;
int root_count;
irn_cost_pair* root_costs;
int i;
static void *normal_init_graph(const list_sched_selector_t *vtab,
- const be_irg_t *birg)
+ ir_graph *irg)
{
- instance_t* inst = XMALLOC(instance_t);
- ir_graph* irg = be_get_birg_irg(birg);
- heights_t* heights;
+ instance_t *inst = XMALLOC(instance_t);
+ ir_heights_t *heights;
(void)vtab;
The link field is used anyway. */
for (i = ARR_LEN(sched) - 1; i >= 0; --i) {
ir_node* irn = sched[i];
- if (!arch_irn_class_is(irn, branch)) {
+ if (!is_cfop(irn)) {
set_irn_link(irn, first);
first = irn;
}
return inst;
}
-void normal_finish_graph(void *env)
+static void normal_finish_graph(void *env)
{
instance_t *inst = env;
normal_init_graph,
normal_init_block,
normal_select,
- NULL, /* to_appear_in_schedule */
NULL, /* node_ready */
NULL, /* node_selected */
NULL, /* exectime */