Commit 7fcabe88 authored by Moritz Kroll's avatar Moritz Kroll
Browse files

Reverted changes from 25529

[r25585]
parent 8713f359
......@@ -1725,25 +1725,24 @@ ir_node *new_rd_Rotl (dbg_info *db, ir_graph *irg, ir_node *block,
/** Constructor for a Conv node.
*
* @param *db A pointer for debug information.
* @param *irg The IR graph the node belongs to.
* @param *block The IR block the node belongs to.
* @param *op The operand.
* @param *mode The mode the operand must be converted to.
* @param strict_flag Whether the Conv is strict.
* @param *db A pointer for debug information.
* @param *irg The IR graph the node belongs to.
* @param *block The IR block the node belongs to.
* @param *op The operand.
* @param *mode The mode of this the operand muss be converted .
*/
ir_node *new_rd_Conv (dbg_info *db, ir_graph *irg, ir_node *block,
ir_node *op, ir_mode *mode, int strict_flag);
ir_node *op, ir_mode *mode);
/** Constructor for a Cast node.
*
* High level type cast.
*
* @param *db A pointer for debug information.
* @param *irg The IR graph the node belongs to.
* @param *irg The IR graph the node belongs to.
* @param *block The IR block the node belongs to.
* @param *op The operand.
* @param *to_tp The type of this the operand muss be casted.
* @param *to_tp The type of this the operand muss be casted .
*/
ir_node *new_rd_Cast (dbg_info *db, ir_graph *irg, ir_node *block,
ir_node *op, ir_type *to_tp);
......@@ -2549,14 +2548,13 @@ ir_node *new_r_Rotl (ir_graph *irg, ir_node *block,
/** Constructor for a Conv node.
*
* @param *irg The IR graph the node belongs to.
* @param *block The IR block the node belongs to.
* @param *op The operand.
* @param *mode The mode the operand must be converted to.
* @param strict_flag Whether the Conv is strict.
* @param *irg The IR graph the node belongs to.
* @param *block The IR block the node belongs to.
* @param *op The operand.
* @param *mode The mode of this the operand muss be converted .
*/
ir_node *new_r_Conv (ir_graph *irg, ir_node *block,
ir_node *op, ir_mode *mode, int strict_flag);
ir_node *op, ir_mode *mode);
/** Constructor for a Cast node.
*
......
......@@ -2043,7 +2043,7 @@ static void modify_irg(be_abi_irg_t *env)
repl = new_r_Proj(irg, reg_params_bl, load, load_mode, pn_Load_res);
if (mode != load_mode) {
repl = new_r_Conv(irg, reg_params_bl, repl, mode, 0);
repl = new_r_Conv(irg, reg_params_bl, repl, mode);
}
} else {
/* The stack parameter is not primitive (it is a struct or array),
......@@ -2059,7 +2059,7 @@ static void modify_irg(be_abi_irg_t *env)
which may be wrong. Add Conv's then. */
mode = get_irn_mode(args[i]);
if (mode != get_irn_mode(repl)) {
repl = new_r_Conv(irg, get_irn_n(repl, -1), repl, mode, 0);
repl = new_r_Conv(irg, get_irn_n(repl, -1), repl, mode);
}
exchange(args[i], repl);
}
......
......@@ -269,7 +269,7 @@ static int map_Shl(ir_node *call, void *ctx) {
if (tarval_cmp(tv, new_tarval_from_long(32, l_mode)) & (pn_Cmp_Gt|pn_Cmp_Eq)) {
/* simplest case: shift only the lower bits. Note that there is no
need to reduce the constant here, this is done by the hardware. */
ir_node *conv = new_rd_Conv(dbg, irg, block, a_l, h_mode, 0);
ir_node *conv = new_rd_Conv(dbg, irg, block, a_l, h_mode);
h_res = new_rd_Shl(dbg, irg, block, conv, cnt, h_mode);
l_res = new_rd_Const(dbg, irg, get_mode_null(l_mode));
......@@ -306,7 +306,7 @@ static int map_Shl(ir_node *call, void *ctx) {
/* the block for cnt >= 32 */
n_block = new_rd_Block(dbg, irg, 1, &in[1]);
h2 = new_rd_Conv(dbg, irg, n_block, l1, h_mode, 0);
h2 = new_rd_Conv(dbg, irg, n_block, l1, h_mode);
l2 = new_r_Const(irg, get_mode_null(l_mode));
in[1] = new_r_Jmp(irg, n_block);
......@@ -357,7 +357,7 @@ static int map_Shr(ir_node *call, void *ctx) {
if (tarval_cmp(tv, new_tarval_from_long(32, l_mode)) & (pn_Cmp_Gt|pn_Cmp_Eq)) {
/* simplest case: shift only the higher bits. Note that there is no
need to reduce the constant here, this is done by the hardware. */
ir_node *conv = new_rd_Conv(dbg, irg, block, a_h, l_mode, 0);
ir_node *conv = new_rd_Conv(dbg, irg, block, a_h, l_mode);
h_res = new_rd_Const(dbg, irg, get_mode_null(h_mode));
l_res = new_rd_Shr(dbg, irg, block, conv, cnt, l_mode);
} else {
......@@ -392,7 +392,7 @@ static int map_Shr(ir_node *call, void *ctx) {
/* the block for cnt >= 32 */
n_block = new_rd_Block(dbg, irg, 1, &in[1]);
l2 = new_rd_Conv(dbg, irg, n_block, h1, l_mode, 0);
l2 = new_rd_Conv(dbg, irg, n_block, h1, l_mode);
h2 = new_r_Const(irg, get_mode_null(h_mode));
in[1] = new_r_Jmp(irg, n_block);
......@@ -443,7 +443,7 @@ static int map_Shrs(ir_node *call, void *ctx) {
if (tarval_cmp(tv, new_tarval_from_long(32, l_mode)) & (pn_Cmp_Gt|pn_Cmp_Eq)) {
/* simplest case: shift only the higher bits. Note that there is no
need to reduce the constant here, this is done by the hardware. */
ir_node *conv = new_rd_Conv(dbg, irg, block, a_h, l_mode, 0);
ir_node *conv = new_rd_Conv(dbg, irg, block, a_h, l_mode);
ir_mode *c_mode = get_irn_mode(cnt);
h_res = new_rd_Shrs(dbg, irg, block, a_h, new_r_Const_long(irg, c_mode, 31), h_mode);
......@@ -480,7 +480,7 @@ static int map_Shrs(ir_node *call, void *ctx) {
/* the block for cnt >= 32 */
n_block = new_rd_Block(dbg, irg, 1, &in[1]);
l2 = new_rd_Conv(dbg, irg, n_block, h1, l_mode, 0);
l2 = new_rd_Conv(dbg, irg, n_block, h1, l_mode);
h2 = new_rd_Shrs(dbg, irg, n_block, a_h, new_r_Const_long(irg, c_mode, 31), h_mode);
in[1] = new_r_Jmp(irg, n_block);
......@@ -581,10 +581,10 @@ static int map_Mul(ir_node *call, void *ctx) {
pEDX = new_rd_Proj(dbg, irg, block, mul, h_mode, pn_ia32_l_Mul_EDX);
l_res = new_rd_Proj(dbg, irg, block, mul, l_mode, pn_ia32_l_Mul_EAX);
b_l = new_rd_Conv(dbg, irg, block, b_l, h_mode, 0);
b_l = new_rd_Conv(dbg, irg, block, b_l, h_mode);
mul = new_rd_Mul( dbg, irg, block, a_h, b_l, h_mode);
add = new_rd_Add( dbg, irg, block, mul, pEDX, h_mode);
a_l = new_rd_Conv(dbg, irg, block, a_l, h_mode, 0);
a_l = new_rd_Conv(dbg, irg, block, a_l, h_mode);
mul = new_rd_Mul( dbg, irg, block, a_l, b_h, h_mode);
h_res = new_rd_Add( dbg, irg, block, add, mul, h_mode);
}
......@@ -654,7 +654,7 @@ static int map_Abs(ir_node *call, void *ctx) {
/* TODO: give a hint to the backend somehow to not create a cltd here... */
sign = new_rd_Shrs(dbg, irg, block, a_h, new_Const_long(l_mode, 31), h_mode);
sign_l = new_rd_Conv(dbg, irg, block, sign, l_mode, 0);
sign_l = new_rd_Conv(dbg, irg, block, sign, l_mode);
sub_l = new_rd_Eor(dbg, irg, block, a_l, sign_l, l_mode);
sub_h = new_rd_Eor(dbg, irg, block, a_h, sign, h_mode);
......
......@@ -112,7 +112,7 @@ static ir_node *gen_Conv(ppc32_transform_env_t *env, ir_node *op) {
switch(from_modecode){
case irm_F:
op = new_rd_Conv(env->dbg, env->irg, env->block, op, mode_D, 0);
op = new_rd_Conv(env->dbg, env->irg, env->block, op, mode_D);
// fall through
case irm_D:
{
......@@ -144,7 +144,7 @@ static ir_node *gen_Conv(ppc32_transform_env_t *env, ir_node *op) {
case irm_Hs:
case irm_Bu:
case irm_Hu:
return new_rd_Conv(env->dbg, env->irg, env->block, res, to_mode, 0);
return new_rd_Conv(env->dbg, env->irg, env->block, res, to_mode);
case irm_Is:
case irm_Iu:
return res;
......@@ -155,14 +155,14 @@ static ir_node *gen_Conv(ppc32_transform_env_t *env, ir_node *op) {
}
case irm_Hs:
case irm_Bs:
op = new_rd_Conv(env->dbg, env->irg, env->block, op, mode_Is, 0);
op = new_rd_Conv(env->dbg, env->irg, env->block, op, mode_Is);
case irm_Is:
return own_gen_convert_call(env, op, (to_mode == mode_D) ? "conv_int_to_double" : "conv_int_to_single", mode_Is, to_mode);
case irm_Hu:
case irm_Bu:
op = new_rd_Conv(env->dbg, env->irg, env->block, op, mode_Iu, 0);
op = new_rd_Conv(env->dbg, env->irg, env->block, op, mode_Iu);
case irm_Iu:
return own_gen_convert_call(env, op, (to_mode == mode_D) ? "conv_unsigned_int_to_double": "conv_unsigned_int_to_single", mode_Iu, to_mode);
......
......@@ -1012,12 +1012,12 @@ new_rd_defaultProj(dbg_info *db, ir_graph *irg, ir_node *block, ir_node *arg,
} /* new_rd_defaultProj */
ir_node *
new_rd_Conv(dbg_info *db, ir_graph *irg, ir_node *block, ir_node *op, ir_mode *mode, int strict_flag) {
new_rd_Conv(dbg_info *db, ir_graph *irg, ir_node *block, ir_node *op, ir_mode *mode) {
ir_node *res;
ir_graph *rem = current_ir_graph;
current_ir_graph = irg;
res = new_bd_Conv(db, block, op, mode, strict_flag);
res = new_bd_Conv(db, block, op, mode, 0);
current_ir_graph = rem;
return res;
......@@ -1645,8 +1645,8 @@ ir_node *new_r_Cmp(ir_graph *irg, ir_node *block,
}
#endif
ir_node *new_r_Conv(ir_graph *irg, ir_node *block,
ir_node *op, ir_mode *mode, int strict_flag) {
return new_rd_Conv(NULL, irg, block, op, mode, strict_flag);
ir_node *op, ir_mode *mode) {
return new_rd_Conv(NULL, irg, block, op, mode);
}
#ifdef USE_ORIGINAL
ir_node *new_r_Cast(ir_graph *irg, ir_node *block, ir_node *op, ir_type *to_tp) {
......
......@@ -2185,7 +2185,7 @@ static ir_node *transform_node_AddSub(ir_node *n) {
/* convert a AddP(P, *s) into AddP(P, *u) */
ir_mode *nm = get_reference_mode_unsigned_eq(mode);
ir_node *pre = new_r_Conv(current_ir_graph, get_nodes_block(n), right, nm, 0);
ir_node *pre = new_r_Conv(current_ir_graph, get_nodes_block(n), right, nm);
set_binop_right(n, pre);
}
}
......@@ -2250,7 +2250,7 @@ static ir_node *transform_node_Add(ir_node *n) {
if (is_Const(b) && is_Const_null(b) && mode_is_int(lmode)) {
/* an Add(a, NULL) is a hidden Conv */
dbg_info *dbg = get_irn_dbg_info(n);
return new_rd_Conv(dbg, current_ir_graph, get_nodes_block(n), a, mode, 0);
return new_rd_Conv(dbg, current_ir_graph, get_nodes_block(n), a, mode);
}
}
......@@ -2370,7 +2370,7 @@ static ir_node *transform_node_Sub(ir_node *n) {
if (is_Const(b) && is_Const_null(b) && mode_is_reference(lmode)) {
/* a Sub(a, NULL) is a hidden Conv */
dbg_info *dbg = get_irn_dbg_info(n);
n = new_rd_Conv(dbg, current_ir_graph, get_nodes_block(n), a, mode, 0);
n = new_rd_Conv(dbg, current_ir_graph, get_nodes_block(n), a, mode);
DBG_OPT_ALGSIM0(oldn, n, FS_OPT_SUB_TO_CONV);
return n;
}
......@@ -2442,7 +2442,7 @@ restart:
ir_node *a_block = get_nodes_block(n);
if (s_mode != mode)
s_right = new_r_Conv(irg, a_block, s_right, mode, 0);
s_right = new_r_Conv(irg, a_block, s_right, mode);
n = new_rd_Add(a_dbg, irg, a_block, sub, s_right, mode);
} else {
ir_node *sub = new_rd_Sub(s_dbg, irg, s_block, s_right, s_left, s_mode);
......@@ -2494,7 +2494,7 @@ restart:
if (left == b) {
if (mode != get_irn_mode(right)) {
/* This Sub is an effective Cast */
right = new_r_Conv(get_irn_irg(n), get_nodes_block(n), right, mode, 0);
right = new_r_Conv(get_irn_irg(n), get_nodes_block(n), right, mode);
}
n = right;
DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_ADD_SUB);
......@@ -2502,7 +2502,7 @@ restart:
} else if (right == b) {
if (mode != get_irn_mode(left)) {
/* This Sub is an effective Cast */
left = new_r_Conv(get_irn_irg(n), get_nodes_block(n), left, mode, 0);
left = new_r_Conv(get_irn_irg(n), get_nodes_block(n), left, mode);
}
n = left;
DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_ADD_SUB);
......@@ -2522,7 +2522,7 @@ restart:
n = new_r_Minus(get_irn_irg(n), get_nodes_block(n), right, r_mode);
if (mode != r_mode) {
/* This Sub is an effective Cast */
n = new_r_Conv(get_irn_irg(n), get_nodes_block(n), n, mode, 0);
n = new_r_Conv(get_irn_irg(n), get_nodes_block(n), n, mode);
}
DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_ADD_SUB);
return n;
......@@ -2532,7 +2532,7 @@ restart:
n = new_r_Minus(get_irn_irg(n), get_nodes_block(n), left, l_mode);
if (mode != l_mode) {
/* This Sub is an effective Cast */
n = new_r_Conv(get_irn_irg(n), get_nodes_block(n), n, mode, 0);
n = new_r_Conv(get_irn_irg(n), get_nodes_block(n), n, mode);
}
DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_ADD_SUB);
return n;
......@@ -2664,7 +2664,7 @@ static ir_node *transform_node_Mul2n(ir_node *n, ir_mode *mode) {
if (ta == get_mode_one(smode)) {
/* (L)1 * (L)b = (L)b */
ir_node *blk = get_nodes_block(n);
n = new_rd_Conv(get_irn_dbg_info(n), current_ir_graph, blk, b, mode, 0);
n = new_rd_Conv(get_irn_dbg_info(n), current_ir_graph, blk, b, mode);
DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_NEUTRAL_1);
return n;
}
......@@ -2672,14 +2672,14 @@ static ir_node *transform_node_Mul2n(ir_node *n, ir_mode *mode) {
/* (L)-1 * (L)b = (L)b */
ir_node *blk = get_nodes_block(n);
n = new_rd_Minus(get_irn_dbg_info(n), current_ir_graph, blk, b, smode);
n = new_rd_Conv(get_irn_dbg_info(n), current_ir_graph, blk, n, mode, 0);
n = new_rd_Conv(get_irn_dbg_info(n), current_ir_graph, blk, n, mode);
DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_MUL_MINUS_1);
return n;
}
if (tb == get_mode_one(smode)) {
/* (L)a * (L)1 = (L)a */
ir_node *blk = get_irn_n(a, -1);
n = new_rd_Conv(get_irn_dbg_info(n), current_ir_graph, blk, a, mode, 0);
n = new_rd_Conv(get_irn_dbg_info(n), current_ir_graph, blk, a, mode);
DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_NEUTRAL_1);
return n;
}
......@@ -2687,7 +2687,7 @@ static ir_node *transform_node_Mul2n(ir_node *n, ir_mode *mode) {
/* (L)a * (L)-1 = (L)-a */
ir_node *blk = get_nodes_block(n);
n = new_rd_Minus(get_irn_dbg_info(n), current_ir_graph, blk, a, smode);
n = new_rd_Conv(get_irn_dbg_info(n), current_ir_graph, blk, n, mode, 0);
n = new_rd_Conv(get_irn_dbg_info(n), current_ir_graph, blk, n, mode);
DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_MUL_MINUS_1);
return n;
}
......@@ -3274,7 +3274,7 @@ static ir_node *transform_bitwise_distributive(ir_node *n,
set_binop_right(n, b_op);
set_irn_mode(n, a_mode);
n = trans_func(n);
n = new_r_Conv(current_ir_graph, blk, n, get_irn_mode(oldn), 0);
n = new_r_Conv(current_ir_graph, blk, n, get_irn_mode(oldn));
DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_SHIFT_AND);
return n;
......@@ -4057,13 +4057,13 @@ static ir_node *transform_node_Proj_Cmp(ir_node *proj) {
changed |= 1;
DBG_OPT_ALGSIM0(n, n, FS_OPT_CMP_CONV_CONV);
} else if (smaller_mode(mode_left, mode_right)) {
left = new_r_Conv(irg, block, op_left, mode_right, 0);
left = new_r_Conv(irg, block, op_left, mode_right);
right = op_right;
changed |= 1;
DBG_OPT_ALGSIM0(n, n, FS_OPT_CMP_CONV);
} else if (smaller_mode(mode_right, mode_left)) {
left = op_left;
right = new_r_Conv(irg, block, op_right, mode_left, 0);
right = new_r_Conv(irg, block, op_right, mode_left);
changed |= 1;
DBG_OPT_ALGSIM0(n, n, FS_OPT_CMP_CONV);
}
......
......@@ -960,7 +960,7 @@ static void lower_Shl(ir_node *node, ir_mode *mode, lower_env_t *env) {
long shf_cnt = get_tarval_long(tv) - get_mode_size_bits(mode);
int idx = get_irn_idx(left);
left = new_r_Conv(irg, block, env->entries[idx]->low_word, mode, 0);
left = new_r_Conv(irg, block, env->entries[idx]->low_word, mode);
idx = get_irn_idx(node);
mode_l = env->params->low_unsigned;
......@@ -1009,7 +1009,7 @@ static void lower_Shrs(ir_node *node, ir_mode *mode, lower_env_t *env) {
low = left;
} /* if */
/* low word is expected to have mode_l */
env->entries[idx]->low_word = new_r_Conv(irg, block, low, mode_l, 0);
env->entries[idx]->low_word = new_r_Conv(irg, block, low, mode_l);
c = new_r_Const_long(irg, mode_l, get_mode_size_bits(mode) - 1);
env->entries[idx]->high_word = new_r_Shrs(irg, block, left, c, mode);
......@@ -1315,8 +1315,8 @@ static void lower_Cond(ir_node *node, ir_mode *mode, lower_env_t *env) {
if (pnc == pn_Cmp_Eq || pnc == pn_Cmp_Lg) {
/* x ==/!= 0 ==> or(low,high) ==/!= 0 */
ir_mode *mode = env->params->low_unsigned;
ir_node *low = new_r_Conv(irg, block, lentry->low_word, mode, 0);
ir_node *high = new_r_Conv(irg, block, lentry->high_word, mode, 0);
ir_node *low = new_r_Conv(irg, block, lentry->low_word, mode);
ir_node *high = new_r_Conv(irg, block, lentry->high_word, mode);
ir_node *or = new_rd_Or(dbg, irg, block, low, high, mode);
ir_node *cmp = new_rd_Cmp(dbg, irg, block, or, new_Const_long(mode, 0));
......@@ -1497,17 +1497,17 @@ static void lower_Conv_to_Ls(ir_node *node, lower_env_t *env) {
pdeq_putr(env->waitq, node);
return;
} /* if */
env->entries[idx]->low_word = new_rd_Conv(dbg, irg, block, env->entries[op_idx]->low_word, dst_mode_l, 0);
env->entries[idx]->high_word = new_rd_Conv(dbg, irg, block, env->entries[op_idx]->high_word, dst_mode_h, 0);
env->entries[idx]->low_word = new_rd_Conv(dbg, irg, block, env->entries[op_idx]->low_word, dst_mode_l);
env->entries[idx]->high_word = new_rd_Conv(dbg, irg, block, env->entries[op_idx]->high_word, dst_mode_h);
} else {
/* simple case: create a high word */
if (imode != dst_mode_l)
op = new_rd_Conv(dbg, irg, block, op, dst_mode_l, 0);
op = new_rd_Conv(dbg, irg, block, op, dst_mode_l);
env->entries[idx]->low_word = op;
if (mode_is_signed(imode)) {
ir_node *op_conv = new_rd_Conv(dbg, irg, block, op, dst_mode_h, 0);
ir_node *op_conv = new_rd_Conv(dbg, irg, block, op, dst_mode_h);
env->entries[idx]->high_word = new_rd_Shrs(dbg, irg, block, op_conv,
new_Const_long(dst_mode_l, get_mode_size_bits(dst_mode_h) - 1), dst_mode_h);
} else {
......@@ -1553,12 +1553,12 @@ static void lower_Conv_to_Lu(ir_node *node, lower_env_t *env) {
pdeq_putr(env->waitq, node);
return;
} /* if */
env->entries[idx]->low_word = new_rd_Conv(dbg, irg, block, env->entries[op_idx]->low_word, dst_mode, 0);
env->entries[idx]->high_word = new_rd_Conv(dbg, irg, block, env->entries[op_idx]->high_word, dst_mode, 0);
env->entries[idx]->low_word = new_rd_Conv(dbg, irg, block, env->entries[op_idx]->low_word, dst_mode);
env->entries[idx]->high_word = new_rd_Conv(dbg, irg, block, env->entries[op_idx]->high_word, dst_mode);
} else {
/* simple case: create a high word */
if (imode != dst_mode)
op = new_rd_Conv(dbg, irg, block, op, dst_mode, 0);
op = new_rd_Conv(dbg, irg, block, op, dst_mode);
env->entries[idx]->low_word = op;
......@@ -1609,7 +1609,7 @@ static void lower_Conv_from_Ls(ir_node *node, lower_env_t *env) {
/* simple case: create a high word */
if (omode != env->params->low_signed)
op = new_rd_Conv(dbg, irg, block, op, omode, 0);
op = new_rd_Conv(dbg, irg, block, op, omode);
set_Conv_op(node, op);
} else {
......@@ -1653,7 +1653,7 @@ static void lower_Conv_from_Lu(ir_node *node, lower_env_t *env) {
/* simple case: create a high word */
if (omode != env->params->low_unsigned)
op = new_rd_Conv(dbg, irg, block, op, omode, 0);
op = new_rd_Conv(dbg, irg, block, op, omode);
set_Conv_op(node, op);
} else {
......
......@@ -141,12 +141,12 @@ static void lower_sel(ir_node *sel) {
assert(irg == current_ir_graph);
if (! is_Unknown(lb))
lb = new_rd_Conv(dbg, irg, bl, copy_const_value(get_irn_dbg_info(sel), lb), mode_Int, 0);
lb = new_rd_Conv(dbg, irg, bl, copy_const_value(get_irn_dbg_info(sel), lb), mode_Int);
else
lb = NULL;
if (! is_Unknown(ub))
ub = new_rd_Conv(dbg, irg, bl, copy_const_value(get_irn_dbg_info(sel), ub), mode_Int, 0);
ub = new_rd_Conv(dbg, irg, bl, copy_const_value(get_irn_dbg_info(sel), ub), mode_Int);
else
ub = NULL;
......@@ -162,7 +162,7 @@ static void lower_sel(ir_node *sel) {
elms = new_rd_Sub(dbg, irg, bl, ub, lb, mode_Int);
}
ind = new_rd_Conv(dbg, irg, bl, get_Sel_index(sel, dim), mode_Int, 0);
ind = new_rd_Conv(dbg, irg, bl, get_Sel_index(sel, dim), mode_Int);
/*
* Normalize index, id lower bound is set, also assume
......
......@@ -220,7 +220,7 @@ int i_mapper_alloca(ir_node *call, void *ctx) {
if (mode == NULL) {
panic("Cannot find unsigned mode for %M", mode);
}
op = new_rd_Conv(dbg, current_ir_graph, block, op, mode, 0);
op = new_rd_Conv(dbg, current_ir_graph, block, op, mode);
}
irn = new_rd_Alloc(dbg, current_ir_graph, block, mem, op, firm_unknown_type, stack_alloc);
......@@ -399,7 +399,7 @@ static int i_mapper_symmetric_zero_to_one(ir_node *call, void *ctx, int reason)
dbg_info *dbg = get_irn_dbg_info(val);
op = get_Minus_op(op);
val = new_rd_Conv(dbg, current_ir_graph, block, op, mode, 0);
val = new_rd_Conv(dbg, current_ir_graph, block, op, mode);
if (is_Conv(val)) {
/* still a Conv ? */
set_Conv_strict(val, 1);
......@@ -760,7 +760,7 @@ replace_by_call:
/* conv to the result mode */
mode = get_type_mode(res_tp);
irn = new_rd_Conv(dbg, current_ir_graph, block, irn, mode, 0);
irn = new_rd_Conv(dbg, current_ir_graph, block, irn, mode);
if (v == right) {
/* negate in the ("", s) case */
......
......@@ -85,7 +85,7 @@ static ir_node *create_convb(ir_node *node)
{
ir_graph *irg = current_ir_graph;
ir_node *block = get_nodes_block(node);
ir_node *conv = new_rd_Conv(NULL, irg, block, node, mode_b, 0);
ir_node *conv = new_rd_Conv(NULL, irg, block, node, mode_b);
return conv;
}
......@@ -116,7 +116,7 @@ static ir_node *create_set(ir_node *node)
ir_node *set = new_rd_Mux(dbgi, irg, block, node, zero, one, mode);
if (mode != config.lowered_mode) {
set = new_r_Conv(irg, block, set, config.lowered_mode, 0);
set = new_r_Conv(irg, block, set, config.lowered_mode);
}
return set;
......@@ -291,8 +291,8 @@ static ir_node *lower_node(ir_node *node)
ir_node *shift_cnt = new_d_Const(dbgi, tv);
if(cmp_mode != mode) {
a = new_rd_Conv(dbgi, irg, block, a, mode, 0);
b = new_rd_Conv(dbgi, irg, block, b, mode, 0);
a = new_rd_Conv(dbgi, irg, block, a, mode);
b = new_rd_Conv(dbgi, irg, block, b, mode);
}
res = new_rd_Sub(dbgi, irg, block, a, b, mode);
......
......@@ -3140,7 +3140,7 @@ static void exchange_leader(ir_node *irn, ir_node *leader) {
ir_node *block = get_nodes_block(leader);
dbg_info *dbg = get_irn_dbg_info(irn);
leader = new_rd_Conv(dbg, current_ir_graph, block, leader, mode, 0);
leader = new_rd_Conv(dbg, current_ir_graph, block, leader, mode);
}
exchange(irn, leader);
} /* exchange_leader */
......
......@@ -160,7 +160,7 @@ int get_conv_costs(const ir_node *node, ir_mode *dest_mode)
static ir_node *place_conv(ir_node *node, ir_mode *dest_mode)
{
ir_node *block = get_nodes_block(node);
ir_node *conv = new_r_Conv(current_ir_graph, block, node, dest_mode, 0);
ir_node *conv = new_r_Conv(current_ir_graph, block, node, dest_mode);
return conv;
}
......
......@@ -507,11 +507,11 @@ static void optimise_muxs_1(ir_node* mux, void* env)
tarval* tv_t = get_Const_tarval(t);
tarval* tv_f = get_Const_tarval(f);
if (tarval_is_one(tv_t) && tarval_is_null(tv_f)) {
ir_node* conv = new_r_Conv(current_ir_graph, block, c, mode, 0);
ir_node* conv = new_r_Conv(current_ir_graph, block, c, mode);
exchange(mux, conv);
} else if (tarval_is_null(tv_t) && tarval_is_one(tv_f)) {
ir_node* not_ = new_r_Not(current_ir_graph, block, c, mode_b);
ir_node* conv = new_r_Conv(current_ir_graph, block, not_, mode, 0);
ir_node* conv = new_r_Conv(current_ir_graph, block, not_, mode);
exchange(mux, conv);
}
}
......
......@@ -877,7 +877,7 @@ static int try_load_after_store(ir_node *load,
/* add an convert if needed */
if (store_mode != load_mode) {
store_value = new_r_Conv(current_ir_graph, get_nodes_block(load),
store_value, load_mode, 0);
store_value, load_mode);
}
}
......@@ -977,7 +977,7 @@ static unsigned follow_Mem_chain(ir_node *load, ir_node *curr) {
/* add an convert if needed */
if (get_Load_mode(pred) != load_mode) {
value = new_r_Conv(current_ir_graph, get_nodes_block(load), value, load_mode, 0);
value = new_r_Conv(current_ir_graph, get_nodes_block(load), value, load_mode);
}
exchange(info->projs[pn_Load_res], value);
......@@ -1067,7 +1067,7 @@ ir_node *can_replace_load_by_const(const ir_node *load, ir_node *c) {
/* copy the value from the const code irg and cast it */
res = copy_const_value(dbg, c);
res = new_rd_Conv(dbg, current_ir_graph, block, res, l_mode, 0);
res = new_rd_Conv(dbg, current_ir_graph, block, res, l_mode);
}
} else {
/* copy the value from the const code irg */
......
......@@ -962,7 +962,7 @@ int inline_method(ir_node *call, ir_graph *called_graph) {
ir_mode *mode = get_type_mode(param_tp);
if (mode != get_irn_mode(arg)) {
arg = new_r_Conv(irg, block, arg, mode, 0);
arg = new_r_Conv(irg, block, arg, mode);
}
args_in[i] = arg;
}
......
......@@ -792,7 +792,7 @@ static void add_memop_avail(block_t *bl, memop_t *op) {
static ir_node *conv_to(ir_node *irn, ir_mode *mode) {
if (get_irn_mode(irn) != mode) {
ir_node *block = get_nodes_block(irn);
return new_r_Conv(current_ir_graph, block, irn, mode, 0);
return new_r_Conv(current_ir_graph, block, irn, mode);
}
return irn;
}
......@@ -1189,7 +1189,7 @@ static void replace_load(memop_t *op) {
/* a hidden cast */
dbg_info *db = get_irn_dbg_info(load);
ir_node *block = get_nodes_block(proj);
def = new_rd_Conv(db, current_ir_graph, block, def, mode, 0);
def = new_rd_Conv(db, current_ir_graph, block, def, mode);
}
exchange(proj, def);
break;
......
......@@ -266,15 +266,15 @@ static int reassoc_commutative(ir_node **node)
if (mode_is_int(mode_c1) && mode_is_int(mode_c2)) {