Commit 1adbf5a8 authored by Michael Beck's avatar Michael Beck
Browse files

- removed Psi nodes, Mux nodes are used again ...

[r21012]
parent d5f03b9d
......@@ -304,7 +304,6 @@
* ir_node *new_Proj (ir_node *arg, ir_mode *mode, long proj);
* ir_node *new_NoMem (void);
* ir_node *new_Mux (ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
* ir_node *new_Psi (int arity, ir_node *conds[], ir_node *vals[], ir_mode *mode);
* ir_node *new_CopyB (ir_node *store, ir_node *dst, ir_node *src, ir_type *data_type);
* ir_node *new_InstOf (ir_node *store, ir_node obj, ir_type *ent);
* ir_node *new_Raise (ir_node *store, ir_node *obj);
......@@ -847,12 +846,6 @@
* ir_true, else ir_false;
*
*
* ir_node *new_Psi (int arity, ir_node *conds[], ir_node *vals[], ir_mode *mode)
* -----------------------------------------------------------------------------
*
* Creates a Psi node. This node implements the following semantic:
* Enter it here!!!
*
*
* OPERATIONS TO MANAGE MEMORY EXPLICITLY
* --------------------------------------
......@@ -1961,19 +1954,6 @@ ir_node *new_rd_NoMem (ir_graph *irg);
ir_node *new_rd_Mux (dbg_info *db, ir_graph *irg, ir_node *block,
ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
/** Constructor for a Psi node.
*
* @param *db A pointer for debug information.
* @param *irg The IR graph the node belong to.
* @param *block The block the node belong to.
* @param *arity The arity of the conditions
* @param *conds The array of mode_b conditions, length must be equal arity
* @param *vals The array of mode values, length must be equal arity + 1
* @param *mode The mode of the node (must be the mode of all vals).
*/
ir_node *new_rd_Psi (dbg_info *db, ir_graph *irg, ir_node *block,
int arity, ir_node *conds[], ir_node *vals[], ir_mode *mode);
/** Constructor for a CopyB node.
*
* @param *db A pointer for debug information.
......@@ -2791,18 +2771,6 @@ ir_node *new_r_NoMem (ir_graph *irg);
ir_node *new_r_Mux (ir_graph *irg, ir_node *block,
ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
/** Constructor for a Psi node.
*
* @param *irg The IR graph the node belong to.
* @param *block The block the node belong to.
* @param *arity The arity of the conditions
* @param *conds The array of mode_b conditions, length must be equal arity
* @param *vals The array of mode values, length must be equal arity + 1
* @param *mode The mode of the node (must be the mode of all vals).
*/
ir_node *new_r_Psi (ir_graph *irg, ir_node *block,
int arity, ir_node *conds[], ir_node *vals[], ir_mode *mode);
/** Constructor for a CopyB node.
*
* @param *irg The IR graph the node belong to.
......@@ -3616,17 +3584,6 @@ ir_node *new_d_NoMem (void);
ir_node *new_d_Mux (dbg_info *db, ir_node *sel,
ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
/** Constructor for a Psi node.
*
* @param *db A pointer for debug information.
* @param *arity The arity of the conditions
* @param *conds The array of mode_b conditions, length must be equal arity
* @param *vals The array of mode values, length must be equal arity + 1
* @param *mode The mode of the node (must be the mode of all vals).
*/
ir_node *new_d_Psi (dbg_info *db,
int arity, ir_node *conds[], ir_node *vals[], ir_mode *mode);
/** Constructor for a CopyB node.
*
* @param *db A pointer for debug information.
......@@ -4370,15 +4327,6 @@ ir_node *new_NoMem (void);
*/
ir_node *new_Mux (ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
/** Constructor for a Psi node.
*
* @param *arity The arity of the conditions
* @param *conds The array of mode_b conditions, length must be equal arity
* @param *vals The array of mode values, length must be equal arity + 1
* @param *mode The mode of the node (must be the mode of all vals).
*/
ir_node *new_Psi (int arity, ir_node *conds[], ir_node *vals[], ir_mode *mode);
/** Constructor for a CopyB node.
*
* Adds the node to the block in current_ir_block.
......
......@@ -1098,8 +1098,7 @@ pn_Cmp get_Confirm_cmp(const ir_node *node);
void set_Confirm_cmp(ir_node *node, pn_Cmp cmp);
/*
* Mux Support: Note that Psi nodes with one condition can be handled
* like Mux nodes, and the access functions work as expected.
* Mux Support
*/
ir_node *get_Mux_sel(const ir_node *node);
void set_Mux_sel(ir_node *node, ir_node *sel);
......@@ -1108,14 +1107,6 @@ void set_Mux_false(ir_node *node, ir_node *ir_false);
ir_node *get_Mux_true(const ir_node *node);
void set_Mux_true(ir_node *node, ir_node *ir_true);
ir_node *get_Psi_cond(const ir_node *node, int pos);
void set_Psi_cond(ir_node *node, int pos, ir_node *cond);
ir_node *get_Psi_val(const ir_node *node, int pos);
void set_Psi_val(ir_node *node, int pos, ir_node *val);
ir_node *get_Psi_default(const ir_node *node);
void set_Psi_default(ir_node *node, ir_node *val);
int get_Psi_n_conds(const ir_node *node);
/**
* Projection numbers for result of CopyB node: use for Proj nodes!
*/
......@@ -1295,8 +1286,6 @@ int is_Shr(const ir_node *node);
int is_Shrs(const ir_node *node);
/** Returns true if node is a Rotl node. */
int is_Rotl(const ir_node *node);
/** Returns true if node is a Psi node. */
int is_Psi(const ir_node *node);
/** Returns true if node is an Id node. */
int is_Id(const ir_node *node);
/** Returns true if node is a Tuple node. */
......@@ -1321,7 +1310,7 @@ int is_Sel(const ir_node *node);
int is_Mul(const ir_node *node);
/** Returns true if node is a Mulh node. */
int is_Mulh(const ir_node *node);
/** Returns true if node is a Mux node or a Psi with only one condition. */
/** Returns true if node is a Mux node. */
int is_Mux(const ir_node *node);
/** Returns true if node is a Load node. */
int is_Load(const ir_node *node);
......
......@@ -92,7 +92,7 @@ typedef enum {
iro_Load, iro_Store, iro_Alloc, iro_Free, iro_Sync,
iro_Proj, iro_Tuple, iro_Id, iro_Bad, iro_Confirm,
iro_Unknown, iro_Filter, iro_Break, iro_CallBegin, iro_EndReg, iro_EndExcept,
iro_NoMem, iro_Mux, iro_Psi, iro_CopyB,
iro_NoMem, iro_Mux, iro_CopyB,
iro_InstOf, iro_Raise, iro_Bound,
iro_Pin,
iro_ASM,
......@@ -186,7 +186,6 @@ extern ir_op *op_EndExcept; ir_op *get_op_EndExcept (void);
extern ir_op *op_NoMem; ir_op *get_op_NoMem (void);
extern ir_op *op_Mux; ir_op *get_op_Mux (void);
extern ir_op *op_Psi; ir_op *get_op_Psi (void);
extern ir_op *op_CopyB; ir_op *get_op_CopyB (void);
extern ir_op *op_InstOf; ir_op *get_op_InstOf (void);
......
......@@ -742,13 +742,6 @@ static void callee_ana_node(ir_node *node, eset *methods) {
callee_ana_node(get_Mux_true(node), methods);
break;
case iro_Psi:
for (i = get_Psi_n_conds(node) - 1; i >= 0; --i) {
callee_ana_node(get_Psi_val(node, i), methods);
}
callee_ana_node(get_Psi_default(node), methods);
break;
case iro_Id:
callee_ana_node(get_Id_pred(node), methods);
break;
......
......@@ -191,9 +191,9 @@ static ir_type *find_type_for_node(ir_node *n) {
switch (get_irn_opcode(n)) {
case iro_InstOf: {
case iro_InstOf:
assert(0 && "op_InstOf not supported");
} break;
break;
/* has no type */
case iro_Return: {
......@@ -233,19 +233,26 @@ static ir_type *find_type_for_node(ir_node *n) {
break;
/* compute the type */
case iro_Const: tp = get_Const_type(n); break;
case iro_Const:
tp = get_Const_type(n);
break;
case iro_SymConst:
tp = get_SymConst_value_type(n); break;
tp = get_SymConst_value_type(n);
break;
case iro_Sel:
tp = find_pointer_type_to(get_entity_type(get_Sel_entity(n))); break;
tp = find_pointer_type_to(get_entity_type(get_Sel_entity(n)));
break;
/* asymmetric binops */
case iro_Shl:
case iro_Shr:
case iro_Shrs:
case iro_Rotl:
tp = tp1; break;
tp = tp1;
break;
case iro_Cast:
tp = get_Cast_type(n); break;
tp = get_Cast_type(n);
break;
case iro_Phi: {
int i;
int n_preds = get_Phi_n_preds(n);
......@@ -282,7 +289,8 @@ static ir_type *find_type_for_node(ir_node *n) {
DB((dbg, SET_LEVEL_2, "Phi %ld with two different types: %s, %s: unknown type.\n", get_irn_node_nr(n),
get_type_name(tp1), get_type_name(tp2)));
tp = firm_unknown_type; /* Test for supertypes? */
} break;
break;
}
case iro_Load: {
ir_node *a = get_Load_ptr(n);
......@@ -295,28 +303,34 @@ static ir_type *find_type_for_node(ir_node *n) {
} else {
DB((dbg, SET_LEVEL_1, "Load %ld with typeless address. result: unknown type\n", get_irn_node_nr(n)));
}
} break;
break;
}
case iro_Alloc:
tp = find_pointer_type_to(get_Alloc_type(n)); break;
tp = find_pointer_type_to(get_Alloc_type(n));
break;
case iro_Proj:
tp = find_type_for_Proj(n); break;
tp = find_type_for_Proj(n);
break;
case iro_Id:
tp = compute_irn_type(get_Id_pred(n)); break;
tp = compute_irn_type(get_Id_pred(n));
break;
case iro_Unknown:
tp = firm_unknown_type; break;
tp = firm_unknown_type;
break;
case iro_Filter:
assert(0 && "Filter not implemented"); break;
assert(0 && "Filter not implemented");
break;
/* catch special cases with fallthrough to binop/unop cases in default. */
case iro_Sub: {
case iro_Sub:
if (mode_is_int(get_irn_mode(n)) &&
mode_is_reference(get_irn_mode(a)) &&
mode_is_reference(get_irn_mode(b)) ) {
DB((dbg, SET_LEVEL_1, "Sub %ld ptr - ptr = int: unknown type\n", get_irn_node_nr(n)));
tp = firm_unknown_type; break;
}
} /* fall through to Add. */
case iro_Add: {
/* fall through to Add. */
case iro_Add:
if (mode_is_reference(get_irn_mode(n)) &&
mode_is_reference(get_irn_mode(a)) &&
mode_is_int(get_irn_mode(b)) ) {
......@@ -328,37 +342,22 @@ static ir_type *find_type_for_node(ir_node *n) {
tp = tp2; break;
}
goto default_code;
} break;
case iro_Mul: {
case iro_Mul:
if (get_irn_mode(n) != get_irn_mode(a)) {
DB((dbg, SET_LEVEL_1, "Mul %ld int1 * int1 = int2: unknown type\n", get_irn_node_nr(n)));
tp = firm_unknown_type; break;
}
goto default_code;
} break;
case iro_Mux: {
case iro_Mux:
a = get_Mux_true(n);
b = get_Mux_false(n);
tp1 = compute_irn_type(a);
tp2 = compute_irn_type(b);
if (tp1 == tp2)
tp = tp1;
} break;
case iro_Psi: {
int i, n_conds = get_Psi_n_conds(n);
tp1 = compute_irn_type(get_Psi_default(n));
for (i = 0; i < n_conds; ++i) {
tp2 = compute_irn_type(get_Psi_val(n, i));
if (tp2 != tp1)
break;
}
if (tp1 == tp2)
tp = tp1;
} break;
break;
case iro_Bound:
tp = compute_irn_type(get_Bound_index(n));
......@@ -372,8 +371,7 @@ static ir_type *find_type_for_node(ir_node *n) {
break;
default:
default_code: {
default_code:
if (is_unop(n)) {
/* It's not proper to walk past a Conv, so this case is handled above. */
tp = tp1;
......@@ -385,7 +383,7 @@ default_code: {
tp = tp1;
break;
}
if((tp1 == phi_cycle_type) || (tp2 == phi_cycle_type)) {
if ((tp1 == phi_cycle_type) || (tp2 == phi_cycle_type)) {
tp = phi_cycle_type;
break;
}
......@@ -396,7 +394,7 @@ default_code: {
}
panic(" not implemented: %+F", n);
} break; /* default */
break;
} /* end switch */
return tp;
......
......@@ -1450,7 +1450,7 @@ static ir_node *gen_Proj_be_SubSP(ir_node *node) {
*/
static ir_node *gen_Proj_Cmp(ir_node *node) {
(void) node;
panic("Psi NYI\n");
panic("Mux NYI\n");
}
......@@ -1672,8 +1672,7 @@ static void arm_register_transformers(void) {
BAD(ASM); /* unsupported yet */
GEN(CopyB);
BAD(Mux);
BAD(Psi); /* unsupported yet */
BAD(Mux); /* unsupported yet */
GEN(Proj);
GEN(Phi);
......
......@@ -2181,8 +2181,8 @@ static ir_node *dest_am_unop(ir_node *node, ir_node *op, ir_node *mem,
static ir_node *try_create_SetMem(ir_node *node, ir_node *ptr, ir_node *mem) {
ir_mode *mode = get_irn_mode(node);
ir_node *psi_true = get_Psi_val(node, 0);
ir_node *psi_default = get_Psi_default(node);
ir_node *mux_true = get_Mux_true(node);
ir_node *mux_false = get_Mux_false(node);
ir_graph *irg;
ir_node *cond;
ir_node *new_mem;
......@@ -2198,9 +2198,9 @@ static ir_node *try_create_SetMem(ir_node *node, ir_node *ptr, ir_node *mem) {
if(get_mode_size_bits(mode) != 8)
return NULL;
if(is_Const_1(psi_true) && is_Const_0(psi_default)) {
if(is_Const_1(mux_true) && is_Const_0(mux_false)) {
negated = 0;
} else if(is_Const_0(psi_true) && is_Const_1(psi_default)) {
} else if(is_Const_0(mux_true) && is_Const_1(mux_false)) {
negated = 1;
} else {
return NULL;
......@@ -2212,7 +2212,7 @@ static ir_node *try_create_SetMem(ir_node *node, ir_node *ptr, ir_node *mem) {
dbgi = get_irn_dbg_info(node);
block = get_nodes_block(node);
new_block = be_transform_node(block);
cond = get_Psi_cond(node, 0);
cond = get_Mux_sel(node);
flags = get_flags_node(cond, &pnc);
new_mem = be_transform_node(mem);
new_node = new_rd_ia32_SetMem(dbgi, irg, new_block, addr.base,
......@@ -2342,7 +2342,7 @@ static ir_node *try_create_dest_am(ir_node *node) {
match_dest_am | match_immediate);
break;
/* TODO: match ROR patterns... */
case iro_Psi:
case iro_Mux:
new_node = try_create_SetMem(val, ptr, mem);
break;
case iro_Minus:
......@@ -2963,8 +2963,8 @@ static ir_node *create_CMov(ir_node *node, ir_node *flags, ir_node *new_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 *val_true = get_Psi_val(node, 0);
ir_node *val_false = get_Psi_default(node);
ir_node *val_true = get_Mux_true(node);
ir_node *val_false = get_Mux_false(node);
ir_node *new_node;
match_flags_t match_flags;
ia32_address_mode_t am;
......@@ -3054,25 +3054,24 @@ static ir_node *create_Doz(ir_node *psi, ir_node *a, ir_node *b) {
}
/**
* Transforms a Psi node into CMov.
* Transforms a Mux node into CMov.
*
* @return The transformed node.
*/
static ir_node *gen_Psi(ir_node *node)
static ir_node *gen_Mux(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 *psi_true = get_Psi_val(node, 0);
ir_node *psi_default = get_Psi_default(node);
ir_node *cond = get_Psi_cond(node, 0);
ir_node *mux_true = get_Mux_true(node);
ir_node *mux_false = get_Mux_false(node);
ir_node *cond = get_Mux_sel(node);
ir_mode *mode = get_irn_mode(node);
pn_Cmp pnc;
assert(get_Psi_n_conds(node) == 1);
assert(get_irn_mode(cond) == mode_b);
/* Note: a Psi node uses a Load two times IFF it's used in the compare AND in the result */
/* Note: a Mux node uses a Load two times IFF it's used in the compare AND in the result */
if (mode_is_float(mode)) {
ir_node *cmp = get_Proj_pred(cond);
ir_node *cmp_left = get_Cmp_left(cmp);
......@@ -3081,28 +3080,28 @@ static ir_node *gen_Psi(ir_node *node)
if (ia32_cg_config.use_sse2) {
if (pnc == pn_Cmp_Lt || pnc == pn_Cmp_Le) {
if (cmp_left == psi_true && cmp_right == psi_default) {
/* psi(a <= b, a, b) => MIN */
if (cmp_left == mux_true && cmp_right == mux_false) {
/* Mux(a <= b, a, b) => MIN */
return gen_binop(node, cmp_left, cmp_right, new_rd_ia32_xMin,
match_commutative | match_am | match_two_users);
} else if (cmp_left == psi_default && cmp_right == psi_true) {
/* psi(a <= b, b, a) => MAX */
} else if (cmp_left == mux_false && cmp_right == mux_true) {
/* Mux(a <= b, b, a) => MAX */
return gen_binop(node, cmp_left, cmp_right, new_rd_ia32_xMax,
match_commutative | match_am | match_two_users);
}
} else if (pnc == pn_Cmp_Gt || pnc == pn_Cmp_Ge) {
if (cmp_left == psi_true && cmp_right == psi_default) {
/* psi(a >= b, a, b) => MAX */
if (cmp_left == mux_true && cmp_right == mux_false) {
/* Mux(a >= b, a, b) => MAX */
return gen_binop(node, cmp_left, cmp_right, new_rd_ia32_xMax,
match_commutative | match_am | match_two_users);
} else if (cmp_left == psi_default && cmp_right == psi_true) {
/* psi(a >= b, b, a) => MIN */
} else if (cmp_left == mux_false && cmp_right == mux_true) {
/* Mux(a >= b, b, a) => MIN */
return gen_binop(node, cmp_left, cmp_right, new_rd_ia32_xMin,
match_commutative | match_am | match_two_users);
}
}
}
panic("cannot transform floating point Psi");
panic("cannot transform floating point Mux");
} else {
ir_node *flags;
......@@ -3119,14 +3118,14 @@ static ir_node *gen_Psi(ir_node *node)
/* check for unsigned Doz first */
if ((pnc & pn_Cmp_Gt) && !mode_is_signed(mode) &&
is_Const_0(psi_default) && is_Sub(psi_true) &&
get_Sub_left(psi_true) == cmp_left && get_Sub_right(psi_true) == cmp_right) {
/* Psi(a >=u b, a - b, 0) unsigned Doz */
is_Const_0(mux_false) && is_Sub(mux_true) &&
get_Sub_left(mux_true) == cmp_left && get_Sub_right(mux_true) == cmp_right) {
/* Mux(a >=u b, a - b, 0) unsigned Doz */
return create_Doz(node, cmp_left, cmp_right);
} else if ((pnc & pn_Cmp_Lt) && !mode_is_signed(mode) &&
is_Const_0(psi_true) && is_Sub(psi_default) &&
get_Sub_left(psi_default) == cmp_left && get_Sub_right(psi_default) == cmp_right) {
/* Psi(a <=u b, 0, a - b) unsigned Doz */
is_Const_0(mux_true) && is_Sub(mux_false) &&
get_Sub_left(mux_false) == cmp_left && get_Sub_right(mux_false) == cmp_right) {
/* Mux(a <=u b, 0, a - b) unsigned Doz */
return create_Doz(node, cmp_left, cmp_right);
}
}
......@@ -3134,11 +3133,11 @@ static ir_node *gen_Psi(ir_node *node)
flags = get_flags_node(cond, &pnc);
if (is_Const(psi_true) && is_Const(psi_default)) {
if (is_Const(mux_true) && is_Const(mux_false)) {
/* both are const, good */
if (is_Const_1(psi_true) && is_Const_0(psi_default)) {
if (is_Const_1(mux_true) && is_Const_0(mux_false)) {
new_node = create_set_32bit(dbgi, new_block, flags, pnc, node, /*is_premuted=*/0);
} else if (is_Const_0(psi_true) && is_Const_1(psi_default)) {
} else if (is_Const_0(mux_true) && is_Const_1(mux_false)) {
new_node = create_set_32bit(dbgi, new_block, flags, pnc, node, /*is_premuted=*/1);
} else {
/* Not that simple. */
......@@ -5421,8 +5420,7 @@ static void register_transformers(void)
GEN(Cmp);
GEN(ASM);
GEN(CopyB);
BAD(Mux);
GEN(Psi);
GEN(Mux);
GEN(Proj);
GEN(Phi);
GEN(IJmp);
......
......@@ -748,30 +748,6 @@ new_bd_Mux(dbg_info *db, ir_node *block,
return res;
} /* new_bd_Mux */
static ir_node *
new_bd_Psi(dbg_info *db, ir_node *block,
int arity, ir_node *cond[], ir_node *vals[], ir_mode *mode) {
ir_node **in;
ir_node *res;
ir_graph *irg = current_ir_graph;
int i;
NEW_ARR_A(ir_node *, in, 2 * arity + 1);
for (i = 0; i < arity; ++i) {
in[2 * i] = cond[i];
in[2 * i + 1] = vals[i];
}
in[2 * i] = vals[i];
res = new_ir_node(db, irg, block, op_Psi, mode, 2 * arity + 1, in);
assert(res);
res = optimize_node(res);
IRN_VRFY_IRG(res, irg);
return res;
} /* new_bd_Psi */
static ir_node *
new_bd_CopyB(dbg_info *db, ir_node *block,
ir_node *store, ir_node *dst, ir_node *src, ir_type *data_type) {
......@@ -1395,19 +1371,6 @@ new_rd_Mux(dbg_info *db, ir_graph *irg, ir_node *block,
return res;
} /* new_rd_Mux */
ir_node *
new_rd_Psi(dbg_info *db, ir_graph *irg, ir_node *block,
int arity, ir_node *cond[], ir_node *vals[], ir_mode *mode) {
ir_node *res;
ir_graph *rem = current_ir_graph;
current_ir_graph = irg;
res = new_bd_Psi(db, block, arity, cond, vals, mode);
current_ir_graph = rem;
return res;
} /* new_rd_Psi */
ir_node *new_rd_CopyB(dbg_info *db, ir_graph *irg, ir_node *block,
ir_node *store, ir_node *dst, ir_node *src, ir_type *data_type) {
ir_node *res;
......@@ -1701,10 +1664,6 @@ ir_node *new_r_Mux(ir_graph *irg, ir_node *block,
ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode) {
return new_rd_Mux(NULL, irg, block, sel, ir_false, ir_true, mode);
}
ir_node *new_r_Psi(ir_graph *irg, ir_node *block,
int arity, ir_node *conds[], ir_node *vals[], ir_mode *mode) {
return new_rd_Psi(NULL, irg, block, arity, conds, vals, mode);
}
ir_node *new_r_CopyB(ir_graph *irg, ir_node *block,
ir_node *store, ir_node *dst, ir_node *src, ir_type *data_type) {
return new_rd_CopyB(NULL, irg, block, store, dst, src, data_type);
......@@ -2641,12 +2600,6 @@ new_d_Mux(dbg_info *db, ir_node *sel, ir_node *ir_false,
sel, ir_false, ir_true, mode);
} /* new_d_Mux */
ir_node *
new_d_Psi(dbg_info *db,int arity, ir_node *conds[], ir_node *vals[], ir_mode *mode) {
return new_bd_Psi(db, current_ir_graph->current_block,
arity, conds, vals, mode);
} /* new_d_Psi */
ir_node *new_d_CopyB(dbg_info *db,ir_node *store,
ir_node *dst, ir_node *src, ir_type *data_type) {
ir_node *res;
......@@ -3099,9 +3052,6 @@ ir_node *new_NoMem(void) {
ir_node *new_Mux(ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode) {
return new_d_Mux(NULL, sel, ir_false, ir_true, mode);
}
ir_node *new_Psi(int arity, ir_node *conds[], ir_node *vals[], ir_mode *mode) {
return new_d_Psi(NULL, arity, conds, vals, mode);
}
ir_node *new_CopyB(ir_node *store, ir_node *dst, ir_node *src, ir_type *data_type) {
return new_d_CopyB(NULL, store, dst, src, data_type);
}
......
......@@ -2206,101 +2206,33 @@ ir_node *get_Filter_cg_pred(ir_node *node, int pos) {
/* Mux support */
ir_node *get_Mux_sel(const ir_node *node) {
if (is_Psi(node)) {
assert(get_irn_arity(node) == 3);
return get_Psi_cond(node, 0);
}
assert(is_Mux(node));
return node->in[1];
}