Commit e293c971 authored by Matthias Braun's avatar Matthias Braun
Browse files

Rename get_type_{size|alignment}_bytes() to get_type{size|alignment}()

parent 002cc34b
...@@ -151,7 +151,7 @@ static void introduce_epilog(ir_node *ret) ...@@ -151,7 +151,7 @@ static void introduce_epilog(ir_node *ret)
kill_unused_stacknodes(sp); kill_unused_stacknodes(sp);
} else { } else {
ir_type *const frame_type = get_irg_frame_type(irg); ir_type *const frame_type = get_irg_frame_type(irg);
unsigned const frame_size = get_type_size_bytes(frame_type); unsigned const frame_size = get_type_size(frame_type);
ir_node *const incsp = be_new_IncSP(sp_reg, block, sp, -frame_size, 0); ir_node *const incsp = be_new_IncSP(sp_reg, block, sp, -frame_size, 0);
set_irn_n(ret, n_sparc_Return_sp, incsp); set_irn_n(ret, n_sparc_Return_sp, incsp);
sched_add_before(ret, incsp); sched_add_before(ret, incsp);
...@@ -166,7 +166,7 @@ static void sparc_introduce_prolog_epilog(ir_graph *irg) ...@@ -166,7 +166,7 @@ static void sparc_introduce_prolog_epilog(ir_graph *irg)
ir_node *block = get_nodes_block(start); ir_node *block = get_nodes_block(start);
ir_node *initial_sp = be_get_Start_proj(irg, sp_reg); ir_node *initial_sp = be_get_Start_proj(irg, sp_reg);
ir_type *frame_type = get_irg_frame_type(irg); ir_type *frame_type = get_irg_frame_type(irg);
unsigned frame_size = get_type_size_bytes(frame_type); unsigned frame_size = get_type_size(frame_type);
/* introduce epilog for every return node */ /* introduce epilog for every return node */
foreach_irn_in(get_irg_end_block(irg), i, ret) { foreach_irn_in(get_irg_end_block(irg), i, ret) {
......
...@@ -274,7 +274,7 @@ static ir_type *compute_arg_type(ir_graph *irg, calling_convention_t *cconv, ...@@ -274,7 +274,7 @@ static ir_type *compute_arg_type(ir_graph *irg, calling_convention_t *cconv,
va_start_entity = NULL; va_start_entity = NULL;
} }
set_type_size_bytes(res, cconv->param_stack_size); set_type_size(res, cconv->param_stack_size);
return res; return res;
} }
...@@ -291,9 +291,9 @@ void sparc_create_stacklayout(ir_graph *irg, calling_convention_t *cconv) ...@@ -291,9 +291,9 @@ void sparc_create_stacklayout(ir_graph *irg, calling_convention_t *cconv)
ir_type *between_type = new_type_class(new_id_from_str("sparc_between_type")); ir_type *between_type = new_type_class(new_id_from_str("sparc_between_type"));
if (cconv->omit_fp) { if (cconv->omit_fp) {
set_type_size_bytes(between_type, 0); set_type_size(between_type, 0);
} else { } else {
set_type_size_bytes(between_type, SPARC_MIN_STACKSIZE); set_type_size(between_type, SPARC_MIN_STACKSIZE);
} }
layout->frame_type = get_irg_frame_type(irg); layout->frame_type = get_irg_frame_type(irg);
...@@ -334,11 +334,11 @@ void sparc_adjust_stack_entity_offsets(ir_graph *irg) ...@@ -334,11 +334,11 @@ void sparc_adjust_stack_entity_offsets(ir_graph *irg)
* low address |-----------------------------| * low address |-----------------------------|
*/ */
ir_type *between_type = layout->between_type; ir_type *between_type = layout->between_type;
unsigned between_size = get_type_size_bytes(between_type); unsigned between_size = get_type_size(between_type);
ir_type *frame_type = get_irg_frame_type(irg); ir_type *frame_type = get_irg_frame_type(irg);
unsigned frame_size = get_type_size_bytes(frame_type); unsigned frame_size = get_type_size(frame_type);
unsigned frame_align = get_type_alignment_bytes(frame_type); unsigned frame_align = get_type_alignment(frame_type);
/* There's the tricky case of the stackframe size not being a multiple /* There's the tricky case of the stackframe size not being a multiple
* of the alignment. There are 2 variants: * of the alignment. There are 2 variants:
...@@ -356,7 +356,7 @@ void sparc_adjust_stack_entity_offsets(ir_graph *irg) ...@@ -356,7 +356,7 @@ void sparc_adjust_stack_entity_offsets(ir_graph *irg)
unsigned misalign = (SPARC_MIN_STACKSIZE+frame_size) % frame_align; unsigned misalign = (SPARC_MIN_STACKSIZE+frame_size) % frame_align;
frame_size += misalign; frame_size += misalign;
} }
set_type_size_bytes(frame_type, frame_size); set_type_size(frame_type, frame_size);
ir_type *arg_type = layout->arg_type; ir_type *arg_type = layout->arg_type;
......
...@@ -776,8 +776,8 @@ void dump_type_to_file(FILE *const F, const ir_type *const tp) ...@@ -776,8 +776,8 @@ void dump_type_to_file(FILE *const F, const ir_type *const tp)
dump_type_details(F, tp); dump_type_details(F, tp);
fprintf(F, " state: %s,\n", get_type_state_name(get_type_state(tp))); fprintf(F, " state: %s,\n", get_type_state_name(get_type_state(tp)));
fprintf(F, " size: %2u Bytes,\n", get_type_size_bytes(tp)); fprintf(F, " size: %2u Bytes,\n", get_type_size(tp));
fprintf(F, " alignment: %2u Bytes,\n", get_type_alignment_bytes((ir_type*)tp)); fprintf(F, " alignment: %2u Bytes,\n", get_type_alignment(tp));
if (is_atomic_type(tp) || is_Method_type(tp)) if (is_atomic_type(tp) || is_Method_type(tp))
fprintf(F, " mode: %s,\n", get_mode_name(get_type_mode(tp))); fprintf(F, " mode: %s,\n", get_mode_name(get_type_mode(tp)));
......
...@@ -518,8 +518,8 @@ static void write_type_common(write_env_t *env, ir_type *tp) ...@@ -518,8 +518,8 @@ static void write_type_common(write_env_t *env, ir_type *tp)
write_symbol(env, "type"); write_symbol(env, "type");
write_long(env, get_type_nr(tp)); write_long(env, get_type_nr(tp));
write_symbol(env, get_type_opcode_name(get_type_opcode(tp))); write_symbol(env, get_type_opcode_name(get_type_opcode(tp)));
write_unsigned(env, get_type_size_bytes(tp)); write_unsigned(env, get_type_size(tp));
write_unsigned(env, get_type_alignment_bytes(tp)); write_unsigned(env, get_type_alignment(tp));
write_type_state(env, get_type_state(tp)); write_type_state(env, get_type_state(tp));
write_unsigned(env, tp->flags); write_unsigned(env, tp->flags);
} }
...@@ -1616,7 +1616,7 @@ static void read_type(read_env_t *env) ...@@ -1616,7 +1616,7 @@ static void read_type(read_env_t *env)
set_array_size_int(type, size); set_array_size_int(type, size);
} }
obstack_free(&env->obst, str); obstack_free(&env->obst, str);
set_type_size_bytes(type, size); set_type_size(type, size);
goto finish_type; goto finish_type;
} }
...@@ -1627,7 +1627,7 @@ static void read_type(read_env_t *env) ...@@ -1627,7 +1627,7 @@ static void read_type(read_env_t *env)
type = get_glob_type(); type = get_glob_type();
else else
type = new_type_class(id); type = new_type_class(id);
set_type_size_bytes(type, size); set_type_size(type, size);
goto finish_type; goto finish_type;
} }
...@@ -1670,21 +1670,21 @@ static void read_type(read_env_t *env) ...@@ -1670,21 +1670,21 @@ static void read_type(read_env_t *env)
case tpo_primitive: { case tpo_primitive: {
ir_mode *mode = read_mode_ref(env); ir_mode *mode = read_mode_ref(env);
type = new_type_primitive(mode); type = new_type_primitive(mode);
set_type_size_bytes(type, size); set_type_size(type, size);
goto finish_type; goto finish_type;
} }
case tpo_struct: { case tpo_struct: {
ident *id = read_ident_null(env); ident *id = read_ident_null(env);
type = new_type_struct(id); type = new_type_struct(id);
set_type_size_bytes(type, size); set_type_size(type, size);
goto finish_type; goto finish_type;
} }
case tpo_union: { case tpo_union: {
ident *id = read_ident_null(env); ident *id = read_ident_null(env);
type = new_type_union(id); type = new_type_union(id);
set_type_size_bytes(type, size); set_type_size(type, size);
goto finish_type; goto finish_type;
} }
...@@ -1706,7 +1706,7 @@ static void read_type(read_env_t *env) ...@@ -1706,7 +1706,7 @@ static void read_type(read_env_t *env)
finish_type: finish_type:
if (align > 0) if (align > 0)
set_type_alignment_bytes(type, align); set_type_alignment(type, align);
type->flags = flags; type->flags = flags;
if (state == layout_fixed) if (state == layout_fixed)
......
...@@ -186,7 +186,7 @@ static ir_graph *gen_initializer_irg(ir_entity *ent_filename, ir_entity *bblock_ ...@@ -186,7 +186,7 @@ static ir_graph *gen_initializer_irg(ir_entity *ent_filename, ir_entity *bblock_
ir_graph *const irg = new_ir_graph(ent, 0); ir_graph *const irg = new_ir_graph(ent, 0);
ir_type *const empty_frame_type = get_irg_frame_type(irg); ir_type *const empty_frame_type = get_irg_frame_type(irg);
set_type_size_bytes(empty_frame_type, 0); set_type_size(empty_frame_type, 0);
set_type_state(empty_frame_type, layout_fixed); set_type_state(empty_frame_type, layout_fixed);
ir_node *const bb = get_r_cur_block(irg); ir_node *const bb = get_r_cur_block(irg);
...@@ -358,12 +358,10 @@ static void instrument_irg(ir_graph *irg, ir_entity *counters, block_id_walker_d ...@@ -358,12 +358,10 @@ static void instrument_irg(ir_graph *irg, ir_entity *counters, block_id_walker_d
static ir_entity *new_array_entity(ident *name, int size) static ir_entity *new_array_entity(ident *name, int size)
{ {
ir_type *const uint_type = new_type_primitive(mode_Iu); ir_type *const uint_type = new_type_primitive(mode_Iu);
set_type_alignment_bytes(uint_type, get_type_size_bytes(uint_type));
ir_type *const array_type = new_type_array(uint_type); ir_type *const array_type = new_type_array(uint_type);
set_array_size_int(array_type, size); set_array_size_int(array_type, size);
set_type_size_bytes(array_type, size * get_mode_size_bytes(mode_Iu)); set_type_size(array_type, size * get_mode_size_bytes(mode_Iu));
set_type_alignment_bytes(array_type, get_mode_size_bytes(mode_Iu));
set_type_state(array_type, layout_fixed); set_type_state(array_type, layout_fixed);
ir_entity *const result = new_entity(get_glob_type(), name, array_type); ir_entity *const result = new_entity(get_glob_type(), name, array_type);
...@@ -384,8 +382,7 @@ static ir_entity *new_static_string_entity(ident *name, const char *string) ...@@ -384,8 +382,7 @@ static ir_entity *new_static_string_entity(ident *name, const char *string)
/* Create the type for a fixed-length string */ /* Create the type for a fixed-length string */
set_array_size_int(string_type, length); set_array_size_int(string_type, length);
set_type_size_bytes(string_type, length); set_type_size(string_type, length);
set_type_alignment_bytes(string_type, 1);
set_type_state(string_type, layout_fixed); set_type_state(string_type, layout_fixed);
ir_entity *const result = new_entity(get_glob_type(), name, string_type); ir_entity *const result = new_entity(get_glob_type(), name, string_type);
......
...@@ -53,7 +53,7 @@ static const char *get_builtin_name(ir_builtin_kind kind) ...@@ -53,7 +53,7 @@ static const char *get_builtin_name(ir_builtin_kind kind)
static const char *get_gcc_machmode(ir_type *type) static const char *get_gcc_machmode(ir_type *type)
{ {
assert(is_Primitive_type(type)); assert(is_Primitive_type(type));
switch (get_type_size_bytes(type)) { switch (get_type_size(type)) {
case 4: return "si"; case 4: return "si";
case 8: return "di"; case 8: return "di";
default: default:
...@@ -71,7 +71,7 @@ static void widen_builtin(ir_node *node) ...@@ -71,7 +71,7 @@ static void widen_builtin(ir_node *node)
ir_type *arg1 = get_method_param_type(mtp, 0); ir_type *arg1 = get_method_param_type(mtp, 0);
// Nothing to do, if argument size is at least machine size. // Nothing to do, if argument size is at least machine size.
if (8 * get_type_size_bytes(arg1) >= be_get_machine_size()) { if (8 * get_type_size(arg1) >= be_get_machine_size()) {
return; return;
} }
......
...@@ -56,9 +56,9 @@ static void lower_small_copyb_node(ir_node *irn) ...@@ -56,9 +56,9 @@ static void lower_small_copyb_node(ir_node *irn)
ir_node *addr_dst = get_CopyB_dst(irn); ir_node *addr_dst = get_CopyB_dst(irn);
ir_node *mem = get_CopyB_mem(irn); ir_node *mem = get_CopyB_mem(irn);
ir_mode *mode_ref = get_irn_mode(addr_src); ir_mode *mode_ref = get_irn_mode(addr_src);
unsigned mode_bytes = unsigned mode_bytes = allow_misalignments ? native_mode_bytes
allow_misalignments ? native_mode_bytes : get_type_alignment_bytes(tp); : get_type_alignment(tp);
unsigned size = get_type_size_bytes(tp); unsigned size = get_type_size(tp);
unsigned offset = 0; unsigned offset = 0;
while (offset < size) { while (offset < size) {
...@@ -126,7 +126,7 @@ static void lower_large_copyb_node(ir_node *irn) ...@@ -126,7 +126,7 @@ static void lower_large_copyb_node(ir_node *irn)
ir_node *addr_src = get_CopyB_src(irn); ir_node *addr_src = get_CopyB_src(irn);
ir_node *addr_dst = get_CopyB_dst(irn); ir_node *addr_dst = get_CopyB_dst(irn);
ir_type *copyb_tp = get_CopyB_type(irn); ir_type *copyb_tp = get_CopyB_type(irn);
unsigned size = get_type_size_bytes(copyb_tp); unsigned size = get_type_size(copyb_tp);
ir_node *callee = get_memcpy_address(irg); ir_node *callee = get_memcpy_address(irg);
ir_type *call_tp = get_memcpy_methodtype(); ir_type *call_tp = get_memcpy_methodtype();
...@@ -142,7 +142,7 @@ static void lower_large_copyb_node(ir_node *irn) ...@@ -142,7 +142,7 @@ static void lower_large_copyb_node(ir_node *irn)
static void lower_copyb_node(ir_node *irn) static void lower_copyb_node(ir_node *irn)
{ {
ir_type *tp = get_CopyB_type(irn); ir_type *tp = get_CopyB_type(irn);
unsigned size = get_type_size_bytes(tp); unsigned size = get_type_size(tp);
if (size <= max_small_size) if (size <= max_small_size)
lower_small_copyb_node(irn); lower_small_copyb_node(irn);
...@@ -164,7 +164,7 @@ static void find_copyb_nodes(ir_node *irn, void *ctx) ...@@ -164,7 +164,7 @@ static void find_copyb_nodes(ir_node *irn, void *ctx)
if (get_type_state(tp) != layout_fixed) if (get_type_state(tp) != layout_fixed)
return; return;
unsigned size = get_type_size_bytes(tp); unsigned size = get_type_size(tp);
bool medium_sized = max_small_size < size && size < min_large_size; bool medium_sized = max_small_size < size && size < min_large_size;
if (medium_sized) if (medium_sized)
return; /* Nothing to do for medium-sized CopyBs. */ return; /* Nothing to do for medium-sized CopyBs. */
......
...@@ -27,7 +27,7 @@ static void lower_sel(ir_node *sel) ...@@ -27,7 +27,7 @@ static void lower_sel(ir_node *sel)
ir_node *const ptr = get_Sel_ptr(sel); ir_node *const ptr = get_Sel_ptr(sel);
ir_type *const type = get_Sel_type(sel); ir_type *const type = get_Sel_type(sel);
ir_type *const element_type = get_array_element_type(type); ir_type *const element_type = get_array_element_type(type);
unsigned const element_size = get_type_size_bytes(element_type); unsigned const element_size = get_type_size(element_type);
ir_node *newn; ir_node *newn;
if (element_size == 0) { if (element_size == 0) {
...@@ -119,7 +119,7 @@ static void lower_align(ir_node *const align) ...@@ -119,7 +119,7 @@ static void lower_align(ir_node *const align)
ir_type *const tp = get_Align_type(align); ir_type *const tp = get_Align_type(align);
assert(get_type_state(tp) == layout_fixed); assert(get_type_state(tp) == layout_fixed);
/* rewrite the Align node by a Const node */ /* rewrite the Align node by a Const node */
replace_by_Const(align, get_type_alignment_bytes(tp)); replace_by_Const(align, get_type_alignment(tp));
} }
/** /**
...@@ -130,7 +130,7 @@ static void lower_size(ir_node *const size) ...@@ -130,7 +130,7 @@ static void lower_size(ir_node *const size)
ir_type *const tp = get_Size_type(size); ir_type *const tp = get_Size_type(size);
assert(get_type_state(tp) == layout_fixed); assert(get_type_state(tp) == layout_fixed);
/* rewrite the Size node by a Const node */ /* rewrite the Size node by a Const node */
replace_by_Const(size, get_type_size_bytes(tp)); replace_by_Const(size, get_type_size(tp));
} }
/** /**
......
...@@ -264,7 +264,7 @@ static ir_tarval *computed_value_Align(const ir_node *n) ...@@ -264,7 +264,7 @@ static ir_tarval *computed_value_Align(const ir_node *n)
{ {
ir_type const *const type = get_Align_type(n); ir_type const *const type = get_Align_type(n);
if (get_type_state(type) == layout_fixed) if (get_type_state(type) == layout_fixed)
return new_tarval_from_long(get_type_alignment_bytes(type), get_irn_mode(n)); return new_tarval_from_long(get_type_alignment(type), get_irn_mode(n));
return tarval_unknown; return tarval_unknown;
} }
...@@ -275,7 +275,7 @@ static ir_tarval *computed_value_Size(const ir_node *n) ...@@ -275,7 +275,7 @@ static ir_tarval *computed_value_Size(const ir_node *n)
{ {
ir_type const *const type = get_Size_type(n); ir_type const *const type = get_Size_type(n);
if (get_type_state(type) == layout_fixed) if (get_type_state(type) == layout_fixed)
return new_tarval_from_long(get_type_size_bytes(type), get_irn_mode(n)); return new_tarval_from_long(get_type_size(type), get_irn_mode(n));
return tarval_unknown; return tarval_unknown;
} }
...@@ -7113,7 +7113,7 @@ static bool sim_store_bitfield(unsigned char *buf, ir_mode *mode, long offset, ...@@ -7113,7 +7113,7 @@ static bool sim_store_bitfield(unsigned char *buf, ir_mode *mode, long offset,
ir_tarval *masked_value = tarval_and(shifted_value, mask); ir_tarval *masked_value = tarval_and(shifted_value, mask);
unsigned mode_size = get_mode_size_bytes(mode); unsigned mode_size = get_mode_size_bytes(mode);
unsigned initializer_size = get_type_size_bytes(type); unsigned initializer_size = get_type_size(type);
for (unsigned b = (unsigned)MAX(0, offset); b < initializer_size; ++b) { for (unsigned b = (unsigned)MAX(0, offset); b < initializer_size; ++b) {
if (b > (unsigned)offset + mode_size) if (b > (unsigned)offset + mode_size)
continue; continue;
...@@ -7134,7 +7134,7 @@ static bool sim_store(unsigned char *buf, ir_mode *mode, long offset, ...@@ -7134,7 +7134,7 @@ static bool sim_store(unsigned char *buf, ir_mode *mode, long offset,
unsigned mode_size = get_mode_size_bytes(mode); unsigned mode_size = get_mode_size_bytes(mode);
if (offset + (int)mode_size <= 0) if (offset + (int)mode_size <= 0)
return true; return true;
unsigned initializer_size = get_type_size_bytes(type); unsigned initializer_size = get_type_size(type);
assert(initializer_size > 0); assert(initializer_size > 0);
if (offset >= (long)initializer_size) if (offset >= (long)initializer_size)
return true; return true;
...@@ -7168,7 +7168,7 @@ handle_tv: ...@@ -7168,7 +7168,7 @@ handle_tv:
case IR_INITIALIZER_COMPOUND: case IR_INITIALIZER_COMPOUND:
if (is_Array_type(type)) { if (is_Array_type(type)) {
ir_type *el_type = get_array_element_type(type); ir_type *el_type = get_array_element_type(type);
unsigned el_size = get_type_size_bytes(el_type); unsigned el_size = get_type_size(el_type);
assert(el_size > 0); assert(el_size > 0);
long offset0 = MAX(0, offset); long offset0 = MAX(0, offset);
size_t first_idx = (size_t) ((unsigned)offset0 / el_size); size_t first_idx = (size_t) ((unsigned)offset0 / el_size);
...@@ -7197,7 +7197,7 @@ handle_tv: ...@@ -7197,7 +7197,7 @@ handle_tv:
const ir_type *member_type = get_entity_type(member); const ir_type *member_type = get_entity_type(member);
int member_offs = get_entity_offset(member); int member_offs = get_entity_offset(member);
if (member_offs >= offset + (long)get_mode_size_bytes(mode) if (member_offs >= offset + (long)get_mode_size_bytes(mode)
|| offset >= member_offs + (long)get_type_size_bytes(member_type)) || offset >= member_offs + (long)get_type_size(member_type))
continue; continue;
if (i > get_initializer_compound_n_entries(initializer)) if (i > get_initializer_compound_n_entries(initializer))
continue; continue;
...@@ -7260,7 +7260,7 @@ static ir_node *extract_from_initializer(const ir_type *type, ...@@ -7260,7 +7260,7 @@ static ir_node *extract_from_initializer(const ir_type *type,
{ {
if (offset < 0) if (offset < 0)
return NULL; return NULL;
unsigned size = get_type_size_bytes(type); unsigned size = get_type_size(type);
if ((unsigned long)offset >= size) if ((unsigned long)offset >= size)
return NULL; return NULL;
...@@ -7310,7 +7310,7 @@ handle_tv:; ...@@ -7310,7 +7310,7 @@ handle_tv:;
case IR_INITIALIZER_COMPOUND: { case IR_INITIALIZER_COMPOUND: {
if (is_Array_type(type)) { if (is_Array_type(type)) {
ir_type *el_type = get_array_element_type(type); ir_type *el_type = get_array_element_type(type);
unsigned el_size = get_type_size_bytes(el_type); unsigned el_size = get_type_size(el_type);
assert(el_size > 0); assert(el_size > 0);
unsigned idx = (unsigned)offset / el_size; unsigned idx = (unsigned)offset / el_size;
if ((size_t)idx >= get_initializer_compound_n_entries(initializer)) if ((size_t)idx >= get_initializer_compound_n_entries(initializer))
...@@ -7329,7 +7329,7 @@ handle_tv:; ...@@ -7329,7 +7329,7 @@ handle_tv:;
const ir_type *member_type = get_entity_type(member); const ir_type *member_type = get_entity_type(member);
int member_offs = get_entity_offset(member); int member_offs = get_entity_offset(member);
if (member_offs >= offset + (long)get_mode_size_bytes(mode) if (member_offs >= offset + (long)get_mode_size_bytes(mode)
|| offset >= member_offs + (long)get_type_size_bytes(member_type)) || offset >= member_offs + (long)get_type_size(member_type))
continue; continue;
if (get_entity_bitfield_size(member) > 0) if (get_entity_bitfield_size(member) > 0)
return NULL; return NULL;
......
...@@ -341,7 +341,7 @@ static void get_base_and_offset(ir_node *ptr, base_offset_t *base_offset) ...@@ -341,7 +341,7 @@ static void get_base_and_offset(ir_node *ptr, base_offset_t *base_offset)
break; break;
/* TODO: may overflow here */ /* TODO: may overflow here */
int size = get_type_size_bytes(element_type); int size = get_type_size(element_type);
offset += size * get_Const_long(index); offset += size * get_Const_long(index);
ptr = get_Sel_ptr(ptr); ptr = get_Sel_ptr(ptr);
} else if (is_Member(ptr)) { } else if (is_Member(ptr)) {
...@@ -581,7 +581,7 @@ static bool try_update_ptr_CopyB(track_load_env_t *env, ir_node *copyb) ...@@ -581,7 +581,7 @@ static bool try_update_ptr_CopyB(track_load_env_t *env, ir_node *copyb)
return false; return false;
ir_type *copyb_type = get_CopyB_type(copyb); ir_type *copyb_type = get_CopyB_type(copyb);
long n_copy = get_type_size_bytes(copyb_type); long n_copy = get_type_size(copyb_type);
ir_node *copyb_src = get_CopyB_src(copyb); ir_node *copyb_src = get_CopyB_src(copyb);
base_offset_t src_base_offset; base_offset_t src_base_offset;
get_base_and_offset(copyb_src, &src_base_offset); get_base_and_offset(copyb_src, &src_base_offset);
...@@ -693,7 +693,7 @@ static changes_t follow_load_mem_chain(track_load_env_t *env, ir_node *start) ...@@ -693,7 +693,7 @@ static changes_t follow_load_mem_chain(track_load_env_t *env, ir_node *start)
/* check aliasing with the CopyB */ /* check aliasing with the CopyB */
ir_node *dst = get_CopyB_dst(node); ir_node *dst = get_CopyB_dst(node);
ir_type *type = get_CopyB_type(node); ir_type *type = get_CopyB_type(node);
unsigned size = get_type_size_bytes(type); unsigned size = get_type_size(type);
ir_alias_relation rel = get_alias_relation( ir_alias_relation rel = get_alias_relation(
dst, type, size, dst, type, size,
env->ptr, load_type, load_size); env->ptr, load_type, load_size);
...@@ -937,7 +937,7 @@ static changes_t follow_store_mem_chain(ir_node *store, ir_node *start, ...@@ -937,7 +937,7 @@ static changes_t follow_store_mem_chain(ir_node *store, ir_node *start,
} else if (is_CopyB(node)) { } else if (is_CopyB(node)) {
ir_node *copyb_src = get_CopyB_src(node); ir_node *copyb_src = get_CopyB_src(node);
ir_type *copyb_type = get_CopyB_type(node); ir_type *copyb_type = get_CopyB_type(node);
unsigned copyb_size = get_type_size_bytes(copyb_type); unsigned copyb_size = get_type_size(copyb_type);
ir_alias_relation src_rel = get_alias_relation( ir_alias_relation src_rel = get_alias_relation(
copyb_src, copyb_type, copyb_size, copyb_src, copyb_type, copyb_size,
ptr, type, size); ptr, type, size);
...@@ -1039,8 +1039,8 @@ static bool ptr_is_in_struct(ir_node *ptr, ir_type *ptr_type, ...@@ -1039,8 +1039,8 @@ static bool ptr_is_in_struct(ir_node *ptr, ir_type *ptr_type,
long ptr_offset = base_offset.offset; long ptr_offset = base_offset.offset;
base_offset_t struct_offset; base_offset_t struct_offset;
get_base_and_offset(struct_ptr, &struct_offset); get_base_and_offset(struct_ptr, &struct_offset);
unsigned ptr_size = get_type_size_bytes(ptr_type); unsigned ptr_size = get_type_size(ptr_type);
unsigned struct_size = get_type_size_bytes(struct_type); unsigned struct_size = get_type_size(struct_type);
return base_offset.base == struct_offset.base && return base_offset.base == struct_offset.base &&
ptr_offset >= struct_offset.offset && ptr_offset >= struct_offset.offset &&
...@@ -1063,7 +1063,7 @@ static changes_t follow_copyb_mem_chain(ir_node *copyb, ir_node *start, ...@@ -1063,7 +1063,7 @@ static changes_t follow_copyb_mem_chain(ir_node *copyb, ir_node *start,
ir_node *src = get_CopyB_src(copyb); ir_node *src = get_CopyB_src(copyb);
ir_node *dst = get_CopyB_dst(copyb); ir_node *dst = get_CopyB_dst(copyb);
ir_type *type = get_CopyB_type(copyb); ir_type *type = get_CopyB_type(copyb);
unsigned size = get_type_size_bytes(type); unsigned size = get_type_size(type);
ir_node *block = get_nodes_block(copyb); ir_node *block = get_nodes_block(copyb);
ir_node *node = start; ir_node *node = start;
...@@ -1130,7 +1130,7 @@ static changes_t follow_copyb_mem_chain(ir_node *copyb, ir_node *start, ...@@ -1130,7 +1130,7 @@ static changes_t follow_copyb_mem_chain(ir_node *copyb, ir_node *start,
ir_node *pred_dst = get_CopyB_dst(node); ir_node *pred_dst = get_CopyB_dst(node);
ir_node *pred_src = get_CopyB_src(node); ir_node *pred_src = get_CopyB_src(node);
ir_type *pred_type = get_CopyB_type(node); ir_type *pred_type = get_CopyB_type(node);
unsigned pred_size = get_type_size_bytes(pred_type); unsigned pred_size = get_type_size(pred_type);
if (src == pred_dst && size == pred_size if (src == pred_dst && size == pred_size
&& get_CopyB_volatility(node) == volatility_non_volatile) { && get_CopyB_volatility(node) == volatility_non_volatile) {
......
...@@ -926,8 +926,8 @@ static void kill_memops(const value_t *value) ...@@ -926,8 +926,8 @@ static void kill_memops(const value_t *value)
ir_type *op_type = get_type_for_mode(op->value.mode); ir_type *op_type = get_type_for_mode(op->value.mode);
/* TODO: determining the access size by the type of the accessed objects /* TODO: determining the access size by the type of the accessed objects
* is too conservative... */ * is too conservative... */
unsigned value_size = get_type_size_bytes(value_type); unsigned value_size = get_type_size(value_type);
unsigned op_size = get_type_size_bytes(op_type); unsigned op_size = get_type_size(op_type);