* @param adr2 The second address.
*/
static ir_alias_relation different_sel_offsets(ir_node *sel1, ir_node *sel2) {
+ /* seems to be broken */
+#if 0
ir_entity *ent1 = get_Sel_entity(sel1);
ir_entity *ent2 = get_Sel_entity(sel2);
int i, check_arr = 0;
return have_no > 0 ? no_alias : sure_alias;
}
}
+#endif
return may_alias;
} /* different_sel_offsets */
ir_node *base2 = find_base_adr(adr2, &ent2);
if (base1 == base2) {
- /* identical bases: check for different offsets */
- return different_sel_offsets(adr1, adr2);
- } else if (base2 == get_irg_frame(irg)) {
- /* both addresses are local variables and we know
- they are different (R1 a) */
- if (ent1 != ent2)
+ /* identical bases: both are local variables */
+ if (ent1 != ent2) {
+ /* both addresses are local variables and we know
+ they are different (R1 a) */
return no_alias;
+ } else {
+ /* same local var */
+ return different_sel_offsets(adr1, adr2);
+ }
} else if (base2 == get_irg_tls(irg)) {
/* the second one is a TLS variable so they are always
different (R1 d) */
ir_node *base2 = find_base_adr(adr2, &ent2);
if (base1 == base2)
- return different_sel_offsets(adr1, adr2);
+ if (ent1 != ent2) {
+ /* both addresses are tls variables and we know
+ they are different (R1 a) */
+ } else {
+ /* same tls var */
+ return different_sel_offsets(adr1, adr2);
+ }
else if (base2 == get_irg_frame(irg)) {
- /* the second one is a local variable so they are always
- different (R1 d) */
+ /* the first one is a tls variable, the second a local one,
+ they are different (R1 d) */
return no_alias;
- } else if (base2 == get_irg_tls(irg)) {
- /* both addresses are TLS variables and we know
- they are different (R1 a) */
- if (ent1 != ent2)
- return no_alias;
}
}
} else if (is_arg_Proj(base1)) {
/* the second address is a Sel */
ir_node *base2 = find_base_adr(adr2, &ent2);
- if (base1 == base2)
+ if (base1 == base2) {
+ /* same global var */
return different_sel_offsets(adr1, adr2);
+ }
else if (base2 == get_irg_frame(irg)) {
/* the second one is a local variable so they are always
different (R1 a) */