assert(res);
assert(get_Proj_pred(res));
- assert(get_nodes_Block(get_Proj_pred(res)));
+ assert(get_nodes_block(get_Proj_pred(res)));
res = optimize_node(res);
{
ir_node *res;
+ assert(is_atomic_type(to_tp));
+
res = new_ir_node(db, irg, block, op_Cast, get_irn_mode(op), 1, &op);
res->attr.cast.totype = to_tp;
res = optimize_node(res);
res = new_ir_node(db, irg, block, op_Call, mode_T, r_arity, r_in);
- assert(is_method_type(tp));
+ assert((get_unknown_type() == tp) || is_method_type(tp));
set_Call_type(res, tp);
- res->attr.call.callee_arr = NULL;
+ res->attr.call.exc.pin_state = op_pin_state_pinned;
+ res->attr.call.callee_arr = NULL;
res = optimize_node(res);
IRN_VRFY_IRG(res, irg);
return res;
in[0] = store;
in[1] = adr;
res = new_ir_node(db, irg, block, op_Load, mode_T, 2, in);
- res->attr.load.load_mode = mode;
+ res->attr.load.exc.pin_state = op_pin_state_pinned;
+ res->attr.load.load_mode = mode;
+ res->attr.load.volatility = volatility_non_volatile;
res = optimize_node(res);
IRN_VRFY_IRG(res, irg);
return res;
in[1] = adr;
in[2] = val;
res = new_ir_node(db, irg, block, op_Store, mode_T, 3, in);
+ res->attr.store.exc.pin_state = op_pin_state_pinned;
+ res->attr.store.volatility = volatility_non_volatile;
res = optimize_node(res);
IRN_VRFY_IRG(res, irg);
return res;
in[0] = store;
in[1] = size;
res = new_ir_node(db, irg, block, op_Alloc, mode_T, 2, in);
- res->attr.a.where = where;
- res->attr.a.type = alloc_type;
+ res->attr.a.exc.pin_state = op_pin_state_pinned;
+ res->attr.a.where = where;
+ res->attr.a.type = alloc_type;
res = optimize_node(res);
IRN_VRFY_IRG(res, irg);
return res;
INLINE ir_node *
new_rd_SymConst_type (dbg_info* db, ir_graph *irg, ir_node *block, symconst_symbol value,
- symconst_kind symkind, type *tp)
-{
+ symconst_kind symkind, type *tp) {
ir_node *res;
ir_mode *mode;
mode = mode_P_mach;
else
mode = mode_Iu;
+
res = new_ir_node(db, irg, block, op_SymConst, mode, 0, NULL);
res->attr.i.num = symkind;
assert(res);
assert(get_Proj_pred(res));
- assert(get_nodes_Block(get_Proj_pred(res)));
+ assert(get_nodes_block(get_Proj_pred(res)));
res = optimize_node(res);
IRN_VRFY_IRG(res, irg);
}
-ir_node *
-new_rd_FuncCall (dbg_info* db, ir_graph *irg, ir_node *block,
- ir_node *callee, int arity, ir_node **in, type *tp)
+INLINE ir_node *
+new_rd_NoMem (ir_graph *irg)
{
- ir_node **r_in;
- ir_node *res;
- int r_arity;
-
- r_arity = arity+1;
- NEW_ARR_A(ir_node *, r_in, r_arity);
- r_in[0] = callee;
- memcpy(&r_in[1], in, sizeof (ir_node *) * arity);
-
- res = new_ir_node(db, irg, block, op_FuncCall, mode_T, r_arity, r_in);
-
- assert(is_method_type(tp));
- set_FuncCall_type(res, tp);
- res->attr.call.callee_arr = NULL;
- res = optimize_node(res);
- IRN_VRFY_IRG(res, irg);
- return res;
+ return irg->no_mem;
}
ir_mode *mode, long proj) {
return new_rd_Filter(NULL, irg, block, arg, mode, proj);
}
-INLINE ir_node *new_r_FuncCall (ir_graph *irg, ir_node *block,
- ir_node *callee, int arity, ir_node **in,
- type *tp) {
- return new_rd_FuncCall(NULL, irg, block, callee, arity, in, tp);
+INLINE ir_node *new_r_NoMem (ir_graph *irg) {
+ return new_rd_NoMem(irg);
}
get_frag_arr (ir_node *n) {
switch (get_irn_opcode(n)) {
case iro_Call:
- return n->attr.call.frag_arr;
+ return n->attr.call.exc.frag_arr;
case iro_Alloc:
- return n->attr.a.frag_arr;
+ return n->attr.a.exc.frag_arr;
case iro_Load:
- return n->attr.load.frag_arr;
+ return n->attr.load.exc.frag_arr;
case iro_Store:
- return n->attr.store.frag_arr;
+ return n->attr.store.exc.frag_arr;
default:
return n->attr.except.frag_arr;
}
ir_node *res;
res = new_rd_Quot (db, current_ir_graph, current_ir_graph->current_block,
memop, op1, op2);
+ res->attr.except.pin_state = op_pin_state_pinned;
#if PRECISE_EXC_CONTEXT
allocate_frag_arr(res, op_Quot, &res->attr.except.frag_arr); /* Could be optimized away. */
#endif
ir_node *res;
res = new_rd_DivMod (db, current_ir_graph, current_ir_graph->current_block,
memop, op1, op2);
+ res->attr.except.pin_state = op_pin_state_pinned;
#if PRECISE_EXC_CONTEXT
allocate_frag_arr(res, op_DivMod, &res->attr.except.frag_arr); /* Could be optimized away. */
#endif
ir_node *res;
res = new_rd_Div (db, current_ir_graph, current_ir_graph->current_block,
memop, op1, op2);
+ res->attr.except.pin_state = op_pin_state_pinned;
#if PRECISE_EXC_CONTEXT
allocate_frag_arr(res, op_Div, &res->attr.except.frag_arr); /* Could be optimized away. */
#endif
ir_node *res;
res = new_rd_Mod (db, current_ir_graph, current_ir_graph->current_block,
memop, op1, op2);
+ res->attr.except.pin_state = op_pin_state_pinned;
#if PRECISE_EXC_CONTEXT
allocate_frag_arr(res, op_Mod, &res->attr.except.frag_arr); /* Could be optimized away. */
#endif
res = new_rd_Call (db, current_ir_graph, current_ir_graph->current_block,
store, callee, arity, in, tp);
#if PRECISE_EXC_CONTEXT
- allocate_frag_arr(res, op_Call, &res->attr.call.frag_arr); /* Could be optimized away. */
+ allocate_frag_arr(res, op_Call, &res->attr.call.exc.frag_arr); /* Could be optimized away. */
#endif
return res;
res = new_rd_Load (db, current_ir_graph, current_ir_graph->current_block,
store, addr, mode);
#if PRECISE_EXC_CONTEXT
- allocate_frag_arr(res, op_Load, &res->attr.load.frag_arr); /* Could be optimized away. */
+ allocate_frag_arr(res, op_Load, &res->attr.load.exc.frag_arr); /* Could be optimized away. */
#endif
return res;
res = new_rd_Store (db, current_ir_graph, current_ir_graph->current_block,
store, addr, val);
#if PRECISE_EXC_CONTEXT
- allocate_frag_arr(res, op_Store, &res->attr.store.frag_arr); /* Could be optimized away. */
+ allocate_frag_arr(res, op_Store, &res->attr.store.exc.frag_arr); /* Could be optimized away. */
#endif
return res;
res = new_rd_Alloc (db, current_ir_graph, current_ir_graph->current_block,
store, size, alloc_type, where);
#if PRECISE_EXC_CONTEXT
- allocate_frag_arr(res, op_Alloc, &res->attr.a.frag_arr); /* Could be optimized away. */
+ allocate_frag_arr(res, op_Alloc, &res->attr.a.exc.frag_arr); /* Could be optimized away. */
#endif
return res;
}
ir_node *
-new_d_FuncCall (dbg_info* db, ir_node *callee, int arity, ir_node **in,
- type *tp)
+(new_d_NoMem)(void)
{
- ir_node *res;
- res = new_rd_FuncCall (db, current_ir_graph, current_ir_graph->current_block,
- callee, arity, in, tp);
-
- return res;
+ return __new_d_NoMem();
}
/* ********************************************************************* */
ir_node *new_Const (ir_mode *mode, tarval *con) {
return new_d_Const(NULL, mode, con);
}
+
+ir_node *new_Const_type(tarval *con, type *tp) {
+ return new_d_Const_type(NULL, get_type_mode(tp), con, tp);
+}
+
ir_node *new_SymConst (symconst_symbol value, symconst_kind kind) {
return new_d_SymConst(NULL, value, kind);
}
ir_node *new_Filter (ir_node *arg, ir_mode *mode, long proj) {
return new_d_Filter(NULL, arg, mode, proj);
}
-ir_node *new_FuncCall (ir_node *callee, int arity, ir_node **in, type *tp) {
- return new_d_FuncCall(NULL, callee, arity, in, tp);
+ir_node *new_NoMem (void) {
+ return new_d_NoMem();
}