X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firopt.c;h=c5291cbf9c0beeb8404cebedf190c614300e8607;hb=3c3425a50a1d721b74a015c6812257e32feeac85;hp=9b9a3447af7fea44e96ee9f55fae080c4684564e;hpb=98beada6bb7ecbc2748b98f5e3b0ecfaa5a49144;p=libfirm diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index 9b9a3447a..c5291cbf9 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -2046,7 +2046,7 @@ static ir_node *transform_node_Or_bf_store(ir_node *irn_or) } /* ok, all conditions met */ - block = get_irn_n(irn_or, -1); + block = get_nodes_block(irn_or); irg = get_irn_irg(block); new_and = new_r_And(block, value, new_r_Const(irg, tarval_and(tv4, tv2)), mode); @@ -3092,7 +3092,7 @@ static ir_node *transform_node_Mul2n(ir_node *n, ir_mode *mode) } if (tb == get_mode_one(smode)) { /* (L)a * (L)1 = (L)a */ - ir_node *blk = get_irn_n(a, -1); + ir_node *blk = get_nodes_block(a); n = new_rd_Conv(get_irn_dbg_info(n), blk, a, mode); DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_NEUTRAL_1); return n; @@ -4112,7 +4112,7 @@ static ir_node *transform_node_Proj_Mod(ir_node *proj) switch (proj_nr) { case pn_Mod_X_regular: - return new_r_Jmp(get_irn_n(mod, -1)); + return new_r_Jmp(get_nodes_block(mod)); case pn_Mod_X_except: { ir_graph *irg = get_irn_irg(proj); @@ -4905,7 +4905,7 @@ is_bittest: { if (tarval_is_single_bit(tv)) { /* special case: (x % 2^n) CMP 0 ==> x & (2^n-1) CMP 0 */ ir_node *v = get_binop_left(op); - ir_node *blk = get_irn_n(op, -1); + ir_node *blk = get_nodes_block(op); ir_graph *irg = get_irn_irg(op); ir_mode *mode = get_irn_mode(v); @@ -5119,7 +5119,6 @@ static ir_node *transform_node_Phi(ir_node *phi) return phi; /* Move the Pin nodes "behind" the Phi. */ - block = get_irn_n(phi, -1); new_phi = new_r_Phi(block, n, in, mode_M); return new_r_Pin(block, new_phi); } @@ -5163,7 +5162,6 @@ static ir_node *transform_node_Phi(ir_node *phi) return phi; /* move the Confirm nodes "behind" the Phi */ - block = get_irn_n(phi, -1); new_phi = new_r_Phi(block, n, in, get_irn_mode(phi)); return new_r_Confirm(block, new_phi, bound, relation); } @@ -6456,7 +6454,7 @@ int identities_cmp(const void *elt, const void *key) if (get_irn_pinned(a) == op_pin_state_pinned) { /* for pinned nodes, the block inputs must be equal */ - if (get_irn_n(a, -1) != get_irn_n(b, -1)) + if (get_nodes_block(a) != get_nodes_block(b)) return 1; } else { ir_node *block_a = get_nodes_block(a); @@ -6622,7 +6620,7 @@ void visit_all_identities(ir_graph *irg, irg_walk_func visit, void *env) ir_graph *rem = current_ir_graph; current_ir_graph = irg; - foreach_pset(irg->value_table, ir_node*, node) { + foreach_pset(irg->value_table, ir_node, node) { visit(node, env); } current_ir_graph = rem;