ir_sc_argument = 0x3, /**< an method argument */
ir_sc_tls = 0x4, /**< an address of a thread local storage variable */
ir_sc_malloced = 0x5, /**< an allocated heap address */
+ ir_sc_globaladdr = 0x6, /**< a constant address of something, said to be alias free */
ir_sc_modifier_nottaken = 0x80 /**< if set, the address of the variable was not taken */
} ir_storage_class_class_t;
res |= ir_sc_modifier_nottaken;
} else if (is_Proj(irn) && is_malloc_Result(irn)) {
return ir_sc_malloced;
+ } else if (is_Const(irn)) {
+ return ir_sc_globaladdr;
}
return res;
/* for some reason CSE didn't happen yet for the 2 SymConsts... */
return ir_may_alias;
+ } else if (class1 == ir_sc_globaladdr) {
+ tarval *tv = get_Const_tarval(base1);
+ offset1 += get_tarval_long(tv);
+ tv = get_Const_tarval(base2);
+ offset2 += get_tarval_long(tv);
+
+ if ((unsigned long)labs(offset2 - offset1) >= mode_size)
+ return ir_no_alias;
+ else
+ return ir_sure_alias;
}
}