- ir_node *res;
- ir_graph *irg = get_irn_irg(block);
- int i;
- int has_unknown = 0;
-
- /* Don't assert that block matured: the use of this constructor is strongly
- restricted ... */
- if (get_Block_matured(block))
- assert(get_irn_arity(block) == arity);
-
- res = new_ir_node(db, irg, block, op_Phi, mode, arity, in);
-
- res->attr.phi.u.backedge = new_backedge_arr(irg->obst, arity);
-
- for (i = arity - 1; i >= 0; --i)
- if (is_Unknown(in[i])) {
- has_unknown = 1;
- break;
- }
-
- if (!has_unknown) res = optimize_node(res);
- IRN_VERIFY_IRG(res, irg);
-
- /* Memory Phis in endless loops must be kept alive.
- As we can't distinguish these easily we keep all of them alive. */
- if (is_Phi(res) && mode == mode_M)
- add_End_keepalive(get_irg_end(irg), res);
- return res;
-} /* new_bd_Phi */
-
-static ir_node *new_bd_Const_type(dbg_info *db, tarval *con, ir_type *tp)
-{
- ir_node *res;
- ir_graph *irg = current_ir_graph;
-
- res = new_ir_node(db, irg, get_irg_start_block(irg), op_Const, get_tarval_mode(con), 0, NULL);
- res->attr.con.tarval = con;
- set_Const_type(res, tp); /* Call method because of complex assertion. */
- res = optimize_node (res);
- assert(get_Const_type(res) == tp);
- IRN_VERIFY_IRG(res, irg);
-
- return res;
-} /* new_bd_Const_type */
-
-static ir_node *new_bd_Const(dbg_info *db, tarval *con)
-{
- ir_graph *irg = current_ir_graph;
-
- return new_rd_Const_type(db, irg, con, firm_unknown_type);
-} /* new_bd_Const */
-
-static ir_node *new_bd_Const_long(dbg_info *db, ir_mode *mode, long value)
-{
- ir_graph *irg = current_ir_graph;
-