X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeschednormal.c;h=22bc29aa7e1cb811bdc56626e6dbaff56210ced1;hb=b4647d67ab7885d5da32c2a30242fbc4ed93d81b;hp=40251e0ae1771aa136c871b0a4aabe7230df7ea3;hpb=ea75e9d38674b468f602a0699fb64b9c01254797;p=libfirm diff --git a/ir/be/beschednormal.c b/ir/be/beschednormal.c index 40251e0ae..22bc29aa7 100644 --- a/ir/be/beschednormal.c +++ b/ir/be/beschednormal.c @@ -30,7 +30,7 @@ #include "belistsched.h" #include "belive_t.h" #include "beutil.h" -#include "height.h" +#include "heights.h" #include "irtools.h" #include "irgwalk.h" #include "benode.h" @@ -119,6 +119,9 @@ static int count_result(const ir_node* irn) 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; @@ -194,9 +197,14 @@ static int normal_tree_cost(ir_node* irn, instance_t *inst) 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; @@ -304,7 +312,7 @@ static int root_cmp(const void* a, const void* b) 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; @@ -369,11 +377,10 @@ static void normal_sched_block(ir_node* block, void* env) 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; @@ -435,7 +442,6 @@ const list_sched_selector_t normal_selector = { normal_init_graph, normal_init_block, normal_select, - NULL, /* to_appear_in_schedule */ NULL, /* node_ready */ NULL, /* node_selected */ NULL, /* exectime */