tarval *tv_size;
if (size == 0)
- return classify_tarval(tv) != TV_CLASSIFY_NULL ? no_alias : may_alias;
+ return tarval_is_null(tv) ? may_alias : no_alias;
tv_size = new_tarval_from_long(size, get_tarval_mode(tv));
return tarval_cmp(tv_size, tv) & (pn_Cmp_Eq|pn_Cmp_Lt) ? no_alias : may_alias;
} /* check_const */
/* Two save some code, sort the addresses by its id's. Beware, this
might break some things, so better check here. */
- assert(iro_SymConst < iro_Sel && iro_Sel < iro_Proj && "Code dependence breaked");
+ assert(iro_SymConst < iro_Sel && iro_Sel < iro_Proj && "Code dependence broken");
op1 = get_irn_opcode(adr1);
op2 = get_irn_opcode(adr2);
if (get_mode_size_bits(mode1) != get_mode_size_bits(mode2))
return no_alias;
+ /* cheap test: if only one is a reference mode, no alias */
+ if (mode_is_reference(mode1) != mode_is_reference(mode2))
+ return no_alias;
+
/* try rule R5 */
rel = different_types(adr1, adr2);
if (rel != may_alias)
if (get_entity_variability(ent) == variability_uninitialized)
return;
+ /* Beware: Methods initialized with "themself". This does not count as a taken
+ address. */
+ if (is_Method_type(get_entity_type(ent)))
+ return;
+
if (is_atomic_entity(ent)) {
/* let's check if it's an address */
n = get_atomic_ent_value(ent);