index = get_Sel_index(sel, 0);
if (is_Array_type(owner)) {
index = get_Sel_index(sel, 0);
if (is_Array_type(owner)) {
- int dims = get_array_n_dimensions(arr_ty);
- int *map = alloca(sizeof(int) * dims);
- int i;
+ int dims = get_array_n_dimensions(arr_ty);
+ int *map = ALLOCAN(int, dims);
+ ir_node *last_size;
+ int i;
/* Size of the array element */
tv = new_tarval_from_long(get_type_size_bytes(basetyp), mode_Int);
/* Size of the array element */
tv = new_tarval_from_long(get_type_size_bytes(basetyp), mode_Int);
- last_size = new_rd_Const(dbg, irg, get_irg_start_block(irg), mode_Int, tv);
+ last_size = new_rd_Const(dbg, irg, tv);
newn = new_rd_Add(dbg, irg, bl, get_Sel_ptr(sel),
new_rd_Mul(dbg, irg, bl, index,
newn = new_rd_Add(dbg, irg, bl, get_Sel_ptr(sel),
new_rd_Mul(dbg, irg, bl, index,
/* We need an additional load when accessing methods from a dispatch table. */
tv = new_tarval_from_long(get_entity_offset(ent), mode_Int);
/* We need an additional load when accessing methods from a dispatch table. */
tv = new_tarval_from_long(get_entity_offset(ent), mode_Int);
- cnst = new_rd_Const(dbg, irg, get_irg_start_block(irg), mode_Int, tv);
+ cnst = new_rd_Const(dbg, irg, tv);
add = new_rd_Add(dbg, irg, bl, get_Sel_ptr(sel), cnst, mode);
#ifdef DO_CACHEOPT /* cacheopt version */
add = new_rd_Add(dbg, irg, bl, get_Sel_ptr(sel), cnst, mode);
#ifdef DO_CACHEOPT /* cacheopt version */
- newn = new_rd_Load(dbg, irg, bl, get_Sel_mem(sel), sel, ent_mode);
+ newn = new_rd_Load(dbg, irg, bl, get_Sel_mem(sel), sel, ent_mode, 0);
- newn = new_rd_Load(dbg, irg, bl, get_Sel_mem(sel), add, ent_mode);
+ newn = new_rd_Load(dbg, irg, bl, get_Sel_mem(sel), add, ent_mode, 0);
#endif
newn = new_r_Proj(irg, bl, newn, ent_mode, pn_Load_res);
#endif
newn = new_r_Proj(irg, bl, newn, ent_mode, pn_Load_res);
ir_mode *mode_UInt = get_reference_mode_unsigned_eq(mode);
tv = new_tarval_from_long(offset, mode_UInt);
ir_mode *mode_UInt = get_reference_mode_unsigned_eq(mode);
tv = new_tarval_from_long(offset, mode_UInt);
newn = new_rd_Add(dbg, irg, bl, newn, cnst, mode);
}
} else {
newn = new_rd_Add(dbg, irg, bl, newn, cnst, mode);
}
} else {
tp = get_SymConst_type(symc);
assert(get_type_state(tp) == layout_fixed);
mode = get_irn_mode(symc);
tp = get_SymConst_type(symc);
assert(get_type_state(tp) == layout_fixed);
mode = get_irn_mode(symc);
- tv = new_tarval_from_long(get_type_size_bytes(tp), mode);
- newn = new_r_Const(current_ir_graph,
- get_irg_start_block(current_ir_graph),
- get_irn_mode(symc), tv);
+ newn = new_Const_long(mode, get_type_size_bytes(tp));
tp = get_SymConst_type(symc);
assert(get_type_state(tp) == layout_fixed);
mode = get_irn_mode(symc);
tp = get_SymConst_type(symc);
assert(get_type_state(tp) == layout_fixed);
mode = get_irn_mode(symc);
- tv = new_tarval_from_long(get_type_alignment_bytes(tp), mode);
- newn = new_r_Const(current_ir_graph,
- get_irg_start_block(current_ir_graph),
- mode, tv);
+ newn = new_Const_long(mode, get_type_alignment_bytes(tp));
ent = get_SymConst_entity(symc);
assert(get_type_state(get_entity_type(ent)) == layout_fixed);
mode = get_irn_mode(symc);
ent = get_SymConst_entity(symc);
assert(get_type_state(get_entity_type(ent)) == layout_fixed);
mode = get_irn_mode(symc);
- tv = new_tarval_from_long(get_entity_offset(ent), mode);
- newn = new_r_Const(current_ir_graph,
- get_irg_start_block(current_ir_graph),
- mode, tv);
+ newn = new_Const_long(mode, get_entity_offset(ent));
ec = get_SymConst_enum(symc);
assert(get_type_state(get_enumeration_owner(ec)) == layout_fixed);
tv = get_enumeration_value(ec);
ec = get_SymConst_enum(symc);
assert(get_type_state(get_enumeration_owner(ec)) == layout_fixed);
tv = get_enumeration_value(ec);
- newn = new_r_Const(current_ir_graph,
- get_irg_start_block(current_ir_graph),
- get_irn_mode(symc), tv);
int offset, bit_offset, bits, bf_bits, old_cse;
dbg_info *db;
int offset, bit_offset, bits, bf_bits, old_cse;
dbg_info *db;
if (shift_count_up) {
res = new_r_Shl(current_ir_graph, block, res,
if (shift_count_up) {
res = new_r_Shl(current_ir_graph, block, res,
- new_r_Const(current_ir_graph, block, mode_Iu, new_tarval_from_long(shift_count_up, mode_Iu)), mode);
+ new_Const_long(mode_Iu, shift_count_up), mode);
}
if (shift_count_down) {
res = new_r_Shrs(current_ir_graph, block, res,
}
if (shift_count_down) {
res = new_r_Shrs(current_ir_graph, block, res,
- new_r_Const(current_ir_graph, block, mode_Iu, new_tarval_from_long(shift_count_down, mode_Iu)), mode);
+ new_Const_long(mode_Iu, shift_count_down), mode);
if (shift_count_down) {
res = new_r_Shr(current_ir_graph, block, res,
if (shift_count_down) {
res = new_r_Shr(current_ir_graph, block, res,
- new_r_Const(current_ir_graph, block, mode_Iu, new_tarval_from_long(shift_count_down, mode_Iu)), mode);
+ new_Const_long(mode_Iu, shift_count_down), mode);
}
if (bits != bf_bits) {
res = new_r_And(current_ir_graph, block, res,
}
if (bits != bf_bits) {
res = new_r_And(current_ir_graph, block, res,
- new_r_Const(current_ir_graph, block, mode, new_tarval_from_long(mask, mode)), mode);
+ new_Const_long(mode, mask), mode);
- irn = new_r_Load(current_ir_graph, block, mem, ptr, mode);
+ irn = new_r_Load(current_ir_graph, block, mem, ptr, mode, 0);
mem = new_r_Proj(current_ir_graph, block, irn, mode_M, pn_Load_M);
irn = new_r_Proj(current_ir_graph, block, irn, mode, pn_Load_res);
irn = new_r_And(current_ir_graph, block, irn,
mem = new_r_Proj(current_ir_graph, block, irn, mode_M, pn_Load_M);
irn = new_r_Proj(current_ir_graph, block, irn, mode, pn_Load_res);
irn = new_r_And(current_ir_graph, block, irn,
- new_r_Const(current_ir_graph, block, mode, new_tarval_from_long(neg_mask, mode)), mode);
+ new_Const_long(mode, neg_mask), mode);
if (bit_offset > 0) {
value = new_r_Shl(current_ir_graph, block, value,
if (bit_offset > 0) {
value = new_r_Shl(current_ir_graph, block, value,
- new_r_Const(current_ir_graph, block, mode_Iu, new_tarval_from_long(bit_offset, mode_Iu)), mode);
+ new_Const_long(mode_Iu, bit_offset), mode);
}
value = new_r_And(current_ir_graph, block, value,
}
value = new_r_And(current_ir_graph, block, value,
- new_r_Const(current_ir_graph, block, mode, new_tarval_from_long(mask, mode)), mode);
+ new_Const_long(mode, mask), mode);
value = new_r_Or(current_ir_graph, block, value, irn, mode);
}
value = new_r_Or(current_ir_graph, block, value, irn, mode);
}