X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=ir%2Fbe%2Fbeuses.c;h=e3af917c615e12aa0d870ea33ab996c7ed2a1c22;hb=bd31a5350ce9e110c058b4ad2223d460c9eb5c4e;hp=b0f519db81ff198909e056523b1dcff8e13b3a8f;hpb=516e2c0969a1faec78ea878970a198e0f53b2187;p=libfirm diff --git a/ir/be/beuses.c b/ir/be/beuses.c index b0f519db8..e3af917c6 100644 --- a/ir/be/beuses.c +++ b/ir/be/beuses.c @@ -75,6 +75,8 @@ static int cmp_use(const void *a, const void *b, size_t n) { const be_use_t *p = a; const be_use_t *q = b; + (void) n; + return !(p->block == q->block && p->node == q->node); } @@ -118,7 +120,7 @@ static const be_use_t *get_or_set_use_block(be_uses_t *env, return result; } -static int be_is_phi_argument(const be_lv_t *lv, const ir_node *block, const ir_node *def) +static int be_is_phi_argument(const ir_node *block, const ir_node *def) { ir_node *node; ir_node *succ_block = NULL; @@ -169,12 +171,12 @@ static be_next_use_t get_next_use(be_uses_t *env, ir_node *from, unsigned from_step, const ir_node *def, int skip_from_uses) { - unsigned step = from_step; + unsigned step = from_step; ir_node *block = get_nodes_block(from); ir_node *next_use; ir_node *node; unsigned timestep; - int next_use_step; + unsigned next_use_step; const ir_edge_t *edge; #if 1 @@ -190,6 +192,8 @@ static be_next_use_t get_next_use(be_uses_t *env, ir_node *from, ir_node *node = get_edge_src_irn(edge); unsigned node_step; + if(is_Anchor(node)) + continue; if(get_nodes_block(node) != block) continue; if(is_Phi(node)) @@ -255,7 +259,7 @@ static be_next_use_t get_next_use(be_uses_t *env, ir_node *from, } #endif - if(be_is_phi_argument(env->lv, block, def)) { + if(be_is_phi_argument(block, def)) { // TODO we really should continue searching the uses of the phi, // as a phi isn't a real use that implies a reload (because we could // easily spill the whole phi) @@ -354,6 +358,7 @@ void set_sched_step_walker(ir_node *block, void *data) { ir_node *node; unsigned step = 0; + (void) data; sched_foreach(block, node) { set_irn_link(node, INT_TO_PTR(step));