Commit 863ceb9d authored by yb9976's avatar yb9976
Browse files

Revert "bring back bitfield sel skipping in irmemory.c"

This reverts commit f56426a9.
Skipping a bitfields within a struct leads to wrong offsets.
parent 7f2f113a
......@@ -429,20 +429,6 @@ ir_storage_class_class_t classify_pointer(const ir_node *irn,
return res;
}
static const ir_node *skip_bitfield_sels(const ir_node *adr)
{
while (is_Sel(adr)) {
ir_entity *entity = get_Sel_entity(adr);
if (is_compound_type(get_entity_owner(entity)) &&
get_entity_bitfield_size(entity) > 0) {
adr = get_Sel_ptr(adr);
} else {
break;
}
}
return adr;
}
/**
* Determine the alias relation between two addresses.
*
......@@ -572,17 +558,6 @@ static ir_alias_relation _get_alias_relation(
return ir_sure_alias;
}
/*
* Bitfields can be constructed as Sels from its base address.
* As they have different entities, the disambiguator would find that they
* are alias free. While this is true for its values, it is false for the
* addresses (strictly speaking, the Sel's are NOT the addresses of the
* bitfields).
* So, skip those bitfield selecting Sel's.
*/
adr1 = skip_bitfield_sels(adr1);
adr2 = skip_bitfield_sels(adr2);
/* skip Sels */
const ir_node *base1 = adr1;
const ir_node *base2 = adr2;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment