Commit 6477a073 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

be: Add and use be_transform_nodes_block().

parent 510577ed
......@@ -46,8 +46,7 @@ static inline bool mode_needs_gp_reg(ir_mode *mode)
static ir_node *transform_binop(ir_node *node, new_binop_func new_func)
{
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *left = get_binop_left(node);
ir_node *new_left = be_transform_node(left);
......@@ -132,8 +131,7 @@ typedef ir_node* (*new_unop_func)(dbg_info *dbgi, ir_node *block, ir_node *op);
static ir_node *transform_unop(ir_node *node, int op_index, new_unop_func new_func)
{
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *op = get_irn_n(node, op_index);
ir_node *new_op = be_transform_node(op);
......@@ -158,8 +156,7 @@ static ir_node *gen_Not(ir_node *node)
static ir_node *gen_Const(ir_node *node)
{
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_tarval *value = get_Const_tarval(node);
return new_bd_TEMPLATE_Const(dbgi, new_block, value);
......@@ -167,8 +164,7 @@ static ir_node *gen_Const(ir_node *node)
static ir_node *gen_Address(ir_node *node)
{
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_entity *entity = get_Address_entity(node);
return new_bd_TEMPLATE_Address(dbgi, new_block, entity);
......@@ -176,8 +172,7 @@ static ir_node *gen_Address(ir_node *node)
static ir_node *gen_Load(ir_node *node)
{
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *ptr = get_Load_ptr(node);
ir_node *new_ptr = be_transform_node(ptr);
......@@ -193,8 +188,7 @@ static ir_node *gen_Load(ir_node *node)
static ir_node *gen_Store(ir_node *node)
{
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *ptr = get_Store_ptr(node);
ir_node *new_ptr = be_transform_node(ptr);
......@@ -212,8 +206,7 @@ static ir_node *gen_Store(ir_node *node)
static ir_node *gen_Jmp(ir_node *node)
{
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
dbg_info *dbgi = get_irn_dbg_info(node);
return new_bd_TEMPLATE_Jmp(dbgi, new_block);
}
......@@ -221,8 +214,7 @@ static ir_node *gen_Jmp(ir_node *node)
static ir_node *gen_Start(ir_node *node)
{
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
ir_node *result = new_bd_TEMPLATE_Start(dbgi, new_block);
/* we have to set ignore registers manually */
arch_set_irn_register_out(result, pn_TEMPLATE_Start_stack,
......@@ -253,7 +245,7 @@ static ir_node *gen_Return(ir_node *node)
}
dbg_info *const dbgi = get_irn_dbg_info(node);
ir_node *const block = be_transform_node(get_nodes_block(node));
ir_node *const block = be_transform_nodes_block(node);
ir_node *const ret = new_bd_TEMPLATE_Return(dbgi, block, n_ins, in);
arch_set_irn_register_reqs_in(ret, reqs);
......
......@@ -482,7 +482,7 @@ ir_tarval *create_sign_tv(ir_mode *mode)
static ir_node *gen_Const(ir_node *node)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_mode *mode = get_irn_mode(node);
ir_tarval *tv = get_Const_tarval(node);
......@@ -502,7 +502,7 @@ static ir_node *gen_Const(ir_node *node)
static ir_node *gen_Address(ir_node *node)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_entity *entity = get_Address_entity(node);
......@@ -639,12 +639,11 @@ static bool needs_extension(ir_node *op)
return !be_upper_bits_clean(op, mode);
}
static ir_node *create_sext(ir_node *block, ir_node *const node, ir_mode *mode)
static ir_node *create_sext(ir_node *new_block, ir_node *const node, ir_mode *mode)
{
amd64_insn_mode_t insn_mode = get_insn_mode_from_mode(mode);
dbg_info *const dbgi = get_irn_dbg_info(node);
ir_node *const new_node = be_transform_node(node);
ir_node *const new_block = be_transform_node(block);
amd64_shift_attr_t attr;
memset(&attr, 0, sizeof(attr));
......@@ -660,10 +659,9 @@ static ir_node *create_sext(ir_node *block, ir_node *const node, ir_mode *mode)
return new_r_Proj(sar, mode_gp, pn_amd64_sar_res);
}
static ir_node *create_zext(ir_node *block, ir_node *const node)
static ir_node *create_zext(ir_node *new_block, ir_node *const node)
{
dbg_info *const dbgi = get_irn_dbg_info(node);
ir_node *const new_block = be_transform_node(block);
ir_node *const xor0 = new_bd_amd64_xor_0(dbgi, new_block);
arch_set_irn_register_reqs_in(xor0, reg_reqs);
return new_r_Proj(xor0, mode_gp, pn_amd64_xor_0_res);
......@@ -1025,9 +1023,8 @@ static ir_node *gen_shift_binop(ir_node *node, ir_node *op1, ir_node *op2,
}
attr.insn_mode = get_insn_mode_from_mode(mode);
ir_node *const block = get_nodes_block(node);
dbg_info *const dbgi = get_irn_dbg_info(node);
ir_node *const new_block = be_transform_node(block);
ir_node *const new_block = be_transform_nodes_block(node);
ir_node *const new_node = func(dbgi, new_block, arity, in, &attr);
arch_set_irn_register_reqs_in(new_node, reqs);
arch_set_irn_register_req_out(new_node, 0, out_req0);
......@@ -1037,8 +1034,7 @@ static ir_node *gen_shift_binop(ir_node *node, ir_node *op1, ir_node *op2,
static ir_node *create_lea_as_add(ir_node *node, ir_node *op1, ir_node *op2)
{
dbg_info *const dbgi = get_irn_dbg_info(node);
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
ir_mode *mode = get_irn_mode(node);
amd64_insn_mode_t insn_mode;
......@@ -1219,8 +1215,7 @@ static ir_node *create_div(ir_node *const node, ir_mode *const mode,
ir_node *const mem)
{
dbg_info *const dbgi = get_irn_dbg_info(node);
ir_node *const block = get_nodes_block(node);
ir_node *const new_block = be_transform_node(block);
ir_node *const new_block = be_transform_nodes_block(node);
amd64_insn_mode_t insn_mode
= get_mode_size_bits(mode) > 32 ? INSN_MODE_64 : INSN_MODE_32;
......@@ -1230,10 +1225,10 @@ static ir_node *create_div(ir_node *const node, ir_mode *const mode,
ir_node *upper_value;
ir_node *(*constructor)(dbg_info*,ir_node*,int,ir_node**,amd64_insn_mode_t);
if (mode_is_signed(mode)) {
upper_value = create_sext(block, op1, mode);
upper_value = create_sext(new_block, op1, mode);
constructor = new_bd_amd64_idiv;
} else {
upper_value = create_zext(block, node);
upper_value = create_zext(new_block, node);
constructor = new_bd_amd64_div;
}
......@@ -1342,7 +1337,7 @@ static ir_node *gen_unop(ir_node *const node, int op_pos, unop_constructor gen,
unsigned pn_res)
{
dbg_info *const dbgi = get_irn_dbg_info(node);
ir_node *const block = be_transform_node(get_nodes_block(node));
ir_node *const block = be_transform_nodes_block(node);
ir_node *const op = get_irn_n(node, op_pos);
ir_node *const new_op = be_transform_node(op);
ir_mode *const mode = get_irn_mode(node);
......@@ -1358,8 +1353,7 @@ static ir_node *gen_unop(ir_node *const node, int op_pos, unop_constructor gen,
static ir_node *gen_float_neg(ir_node *const node)
{
dbg_info *const dbgi = get_irn_dbg_info(node);
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
ir_node *op = get_irn_n(node, n_Minus_op);
ir_node *new_op = be_transform_node(op);
ir_mode *mode = get_irn_mode(node);
......@@ -1398,8 +1392,7 @@ static ir_node *gen_Not(ir_node *const node)
static ir_node *gen_Member(ir_node *const node)
{
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *ptr = get_Member_ptr(node);
ir_graph *irg = get_irn_irg(node);
......@@ -1487,8 +1480,7 @@ static ir_node *gen_IJmp(ir_node *node)
static ir_node *gen_Jmp(ir_node *node)
{
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
dbg_info *dbgi = get_irn_dbg_info(node);
return new_bd_amd64_jmp(dbgi, new_block);
......@@ -1497,7 +1489,7 @@ static ir_node *gen_Jmp(ir_node *node)
static ir_node *gen_Switch(ir_node *node)
{
ir_graph *irg = get_irn_irg(node);
ir_node *new_block = be_transform_node(get_nodes_block(node));
ir_node *new_block = be_transform_nodes_block(node);
ir_node *sel = get_Switch_selector(node);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *new_sel = be_transform_node(sel);
......@@ -1522,8 +1514,7 @@ static ir_node *gen_Start(ir_node *node)
ir_graph *irg = get_irn_irg(node);
ir_entity *entity = get_irg_entity(irg);
ir_type *function_type = get_entity_type(entity);
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
dbg_info *dbgi = get_irn_dbg_info(node);
struct obstack *obst = be_get_be_obst(irg);
......@@ -1616,9 +1607,8 @@ static ir_node *get_stack_pointer_for(ir_node *node)
static ir_node *gen_Return(ir_node *node)
{
ir_node *block = get_nodes_block(node);
ir_graph *irg = get_irn_irg(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *mem = get_Return_mem(node);
ir_node *new_mem = be_transform_node(mem);
......@@ -1939,8 +1929,7 @@ static ir_node *gen_Proj_Proj_Call(ir_node *node)
static ir_node *gen_Proj_Proj_Start(ir_node *node)
{
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
unsigned pn = get_Proj_num(node);
ir_node *args = get_Proj_pred(node);
ir_node *start = get_Proj_pred(args);
......@@ -2067,7 +2056,7 @@ static ir_node *gen_Cond(ir_node *node)
ir_node *flags = get_flags_node(sel, &cc);
dbg_info *const dbgi = get_irn_dbg_info(node);
ir_node *const block = be_transform_node(get_nodes_block(node));
ir_node *const block = be_transform_nodes_block(node);
return new_bd_amd64_jcc(dbgi, block, flags, cc);
}
......@@ -2184,7 +2173,7 @@ static ir_node *create_cvtsd2ss(dbg_info *dbgi, ir_node *block, ir_node *value)
static ir_node *gen_Conv(ir_node *node)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_node *op = get_Conv_op(node);
ir_mode *src_mode = get_irn_mode(op);
ir_mode *dst_mode = get_irn_mode(node);
......@@ -2356,7 +2345,7 @@ static ir_node *gen_Conv(ir_node *node)
static ir_node *gen_Store(ir_node *node)
{
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_node *val = get_Store_value(node);
ir_mode *mode = get_irn_mode(val);
......@@ -2486,7 +2475,7 @@ static ir_node *gen_Load(ir_node *node)
{
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_mode *mode = get_Load_mode(node);
ir_node *ptr = get_Load_ptr(node);
......@@ -2535,7 +2524,7 @@ static ir_node *gen_Load(ir_node *node)
static ir_node *gen_Unknown(ir_node *node)
{
/* for now, there should be more efficient ways to do this */
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
if (mode_is_float(get_irn_mode(node))) {
return new_bd_amd64_xorpd_0(NULL, block);
......@@ -2614,8 +2603,7 @@ static ir_node *gen_Proj_Store(ir_node *node)
static ir_node *gen_Alloc(ir_node *node)
{
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
ir_node *size = get_Alloc_size(node);
ir_node *mem = get_Alloc_mem(node);
ir_node *new_mem = be_transform_node(mem);
......@@ -2675,7 +2663,7 @@ static ir_node *gen_Proj_Alloc(ir_node *node)
static ir_node *gen_saturating_increment(ir_node *node)
{
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *new_block = be_transform_node(get_nodes_block(node));
ir_node *new_block = be_transform_nodes_block(node);
ir_node *param0 = get_Builtin_param(node, 0);
ir_node *operand = be_transform_node(param0);
ir_mode *mode = get_irn_mode(param0);
......
......@@ -235,7 +235,7 @@ static bool upper_bits_clean(ir_node *transformed_node, ir_mode *mode)
*/
static ir_node *gen_Conv(ir_node *node)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_node *op = get_Conv_op(node);
ir_node *new_op = be_transform_node(op);
ir_mode *src_mode = get_irn_mode(op);
......@@ -416,7 +416,7 @@ static ir_node *gen_int_binop_ops(ir_node *node, ir_node *op1, ir_node *op2,
match_flags_t flags,
const arm_binop_factory_t *factory)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
dbg_info *dbgi = get_irn_dbg_info(node);
if (flags & MATCH_SIZE_NEUTRAL) {
......@@ -528,7 +528,7 @@ static ir_node *gen_Ror(ir_node *node, ir_node *op1, ir_node *op2,
bool negate_op)
{
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_node *new_op1 = be_transform_node(op1);
if (is_Const(op2)) {
ir_tarval *tv = get_Const_tarval(op2);
......@@ -621,7 +621,7 @@ static ir_node *gen_Add(ir_node *node)
ir_mode *mode = get_irn_mode(node);
if (mode_is_float(mode)) {
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_node *op1 = get_Add_left(node);
ir_node *op2 = get_Add_right(node);
dbg_info *dbgi = get_irn_dbg_info(node);
......@@ -714,8 +714,7 @@ static ir_node *gen_arm_AdC_t(ir_node *node)
ir_node *new_flags = be_transform_node(flags);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
ir_node *res = new_bd_arm_AdC_reg(dbgi, new_block, new_left,
new_right, new_flags);
return res;
......@@ -728,7 +727,7 @@ static ir_node *gen_arm_AdC_t(ir_node *node)
*/
static ir_node *gen_Mul(ir_node *node)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_node *op1 = get_Mul_left(node);
ir_node *new_op1 = be_transform_node(op1);
ir_node *op2 = get_Mul_right(node);
......@@ -753,7 +752,7 @@ static ir_node *gen_Mul(ir_node *node)
static ir_node *gen_arm_UMulL_t(ir_node *node)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_node *left = get_irn_n(node, n_arm_UMulL_t_left);
ir_node *new_left = be_transform_node(left);
ir_node *right = get_irn_n(node, n_arm_UMulL_t_right);
......@@ -778,7 +777,7 @@ static ir_node *gen_Proj_arm_UMulL_t(ir_node *node)
static ir_node *gen_Div(ir_node *node)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_node *op1 = get_Div_left(node);
ir_node *new_op1 = be_transform_node(op1);
ir_node *op2 = get_Div_right(node);
......@@ -863,8 +862,7 @@ static ir_node *gen_arm_OrPl_t(ir_node *node)
ir_node *new_flags = be_transform_node(flags);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
ir_node *res = new_bd_arm_OrPl(dbgi, new_block, new_left, new_right,
new_falseval, new_flags);
return res;
......@@ -888,7 +886,7 @@ static ir_node *gen_Sub(ir_node *node)
ir_node *left = get_Sub_left(node);
ir_node *right = get_Sub_right(node);
if (mode_is_float(mode)) {
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_node *new_left = be_transform_node(left);
ir_node *new_right = be_transform_node(right);
dbg_info *dbgi = get_irn_dbg_info(node);
......@@ -901,7 +899,7 @@ static ir_node *gen_Sub(ir_node *node)
} else {
if (is_Mul(right) && arm_cg_config.variant >= ARM_VARIANT_6T2) {
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_node *mul_left = get_Mul_left(right);
ir_node *mul_right = get_Mul_right(right);
ir_node *new_left = be_transform_node(mul_left);
......@@ -981,8 +979,7 @@ static ir_node *gen_arm_SbC_t(ir_node *node)
ir_node *new_flags = be_transform_node(flags);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
ir_node *res = new_bd_arm_SbC_reg(dbgi, new_block, new_left,
new_right, new_flags);
return res;
......@@ -1012,7 +1009,7 @@ static bool can_use_shift_constant(unsigned int val,
static ir_node *make_shift(ir_node *node, match_flags_t flags,
arm_shift_modifier_t shift_modifier)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_node *op1 = get_binop_left(node);
ir_node *op2 = get_binop_right(node);
dbg_info *dbgi = get_irn_dbg_info(node);
......@@ -1063,7 +1060,7 @@ static ir_node *gen_Shrs(ir_node *node)
static ir_node *gen_Not(ir_node *node)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_node *op = get_Not_op(node);
ir_node *new_op = be_transform_node(op);
dbg_info *dbgi = get_irn_dbg_info(node);
......@@ -1106,7 +1103,7 @@ static ir_node *gen_Not(ir_node *node)
static ir_node *gen_Minus(ir_node *node)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_node *op = get_Minus_op(node);
ir_node *new_op = be_transform_node(op);
dbg_info *dbgi = get_irn_dbg_info(node);
......@@ -1125,7 +1122,7 @@ static ir_node *gen_Minus(ir_node *node)
static ir_node *gen_Load(ir_node *node)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_node *ptr = get_Load_ptr(node);
ir_node *new_ptr = be_transform_node(ptr);
ir_node *mem = get_Load_mem(node);
......@@ -1155,7 +1152,7 @@ static ir_node *gen_Load(ir_node *node)
static ir_node *gen_Store(ir_node *node)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_node *ptr = get_Store_ptr(node);
ir_node *new_ptr = be_transform_node(ptr);
ir_node *mem = get_Store_mem(node);
......@@ -1186,8 +1183,7 @@ static ir_node *gen_Store(ir_node *node)
static ir_node *gen_Jmp(ir_node *node)
{
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
dbg_info *dbgi = get_irn_dbg_info(node);
return new_bd_arm_Jmp(dbgi, new_block);
}
......@@ -1195,7 +1191,7 @@ static ir_node *gen_Jmp(ir_node *node)
static ir_node *gen_Switch(ir_node *node)
{
ir_graph *irg = get_irn_irg(node);
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_node *selector = get_Switch_selector(node);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *new_op = be_transform_node(selector);
......@@ -1214,7 +1210,7 @@ static ir_node *gen_Switch(ir_node *node)
static ir_node *gen_Cmp(ir_node *node)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_node *op1 = get_Cmp_left(node);
ir_node *op2 = get_Cmp_right(node);
ir_mode *cmp_mode = get_irn_mode(op1);
......@@ -1241,7 +1237,7 @@ static ir_node *gen_Cmp(ir_node *node)
static ir_node *gen_Cond(ir_node *node)
{
ir_node *const block = be_transform_node(get_nodes_block(node));
ir_node *const block = be_transform_nodes_block(node);
dbg_info *const dbgi = get_irn_dbg_info(node);
ir_node *const selector = get_Cond_selector(node);
ir_node *const flag_node = be_transform_node(selector);
......@@ -1259,7 +1255,7 @@ static ir_tarval *fpa_imm[FPA_IMM_MAX + 1][fpa_max];
static ir_node *gen_Const(ir_node *node)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_mode *mode = get_irn_mode(node);
dbg_info *dbg = get_irn_dbg_info(node);
......@@ -1276,7 +1272,7 @@ static ir_node *gen_Const(ir_node *node)
static ir_node *gen_Address(ir_node *node)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_entity *entity = get_Address_entity(node);
dbg_info *dbgi = get_irn_dbg_info(node);
if (is_tls_entity(entity))
......@@ -1364,7 +1360,7 @@ static void double_to_ints(dbg_info *dbgi, ir_node *block, ir_node *node,
static ir_node *gen_CopyB(ir_node *node)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_node *src = get_CopyB_src(node);
ir_node *new_src = be_transform_node(src);
ir_node *dst = get_CopyB_dst(node);
......@@ -1388,7 +1384,7 @@ static ir_node *gen_CopyB(ir_node *node)
*/
static ir_node *gen_clz(ir_node *node)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
dbg_info *dbg = get_irn_dbg_info(node);
ir_node *op = get_irn_n(node, 1);
ir_node *new_op = be_transform_node(op);
......@@ -1532,8 +1528,7 @@ static ir_node *gen_Proj_Start(ir_node *node)
static ir_node *gen_Proj_Proj_Start(ir_node *node)
{
unsigned pn = get_Proj_num(node);
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
ir_graph *irg = get_irn_irg(new_block);
ir_node *args = get_Proj_pred(node);
ir_node *start = get_Proj_pred(args);
......@@ -1677,8 +1672,7 @@ static ir_node *gen_Proj_Proj(ir_node *node)
static ir_node *gen_Unknown(ir_node *node)
{
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
dbg_info *dbgi = get_irn_dbg_info(node);
/* just produce a 0 */
......@@ -1760,8 +1754,7 @@ static ir_node *gen_Start(ir_node *node)
ir_graph *irg = get_irn_irg(node);
ir_entity *entity = get_irg_entity(irg);
ir_type *function_type = get_entity_type(entity);
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
dbg_info *dbgi = get_irn_dbg_info(node);
struct obstack *obst = be_get_be_obst(irg);
......@@ -1830,8 +1823,7 @@ static ir_node *get_stack_pointer_for(ir_node *node)
*/
static ir_node *gen_Return(ir_node *node)
{
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *mem = get_Return_mem(node);
ir_node *new_mem = be_transform_node(mem);
......@@ -1891,8 +1883,7 @@ static ir_node *gen_Call(ir_node *node)
{
ir_graph *irg = get_irn_irg(node);
ir_node *callee = get_Call_ptr(node);
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
ir_node *mem = get_Call_mem(node);
ir_node *new_mem = be_transform_node(mem);
dbg_info *dbgi = get_irn_dbg_info(node);
......@@ -2052,8 +2043,7 @@ static ir_node *gen_Call(ir_node *node)
static ir_node *gen_Member(ir_node *node)
{
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
ir_node *new_block = be_transform_nodes_block(node);
ir_node *ptr = get_Member_ptr(node);
ir_node *new_ptr = be_transform_node(ptr);
ir_entity *entity = get_Member_entity(node);
......
......@@ -54,7 +54,7 @@ bool be_is_transformed(const ir_node *node)
ir_node *be_transform_phi(ir_node *node, const arch_register_req_t *req)
{
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
ir_graph *irg = get_irn_irg(block);
dbg_info *dbgi = get_irn_dbg_info(node);
......@@ -120,7 +120,7 @@ static ir_node *transform_end(ir_node *node)
* phase from visiting all the graph. */
ir_graph *irg = get_irn_irg(node);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *block = be_transform_nodes_block(node);
int arity = get_irn_arity(node);
ir_node **ins = get_irn_in(node) + 1;
ir_node *new_end = new_ir_node(dbgi, irg, block, op_End, mode_X, arity, ins);
......@@ -163,7 +163,7 @@ ir_node *be_duplicate_node(ir_node *const node)
ins[i] = be_transform_node(in);
}
ir_node *const block = be_transform_node(get_nodes_block(node));
ir_node *const block = be_transform_nodes_block(node);
ir_node *const new_node = new_similar_node(node, block, ins);
new_node->node_nr = node->node_nr;
......@@ -192,6 +192,12 @@ ir_node *be_transform_node(ir_node *node)
return new_node;
}