/* try the called entity */
ir_node *ptr = get_Call_ptr(call);
- if (is_SymConst_addr_ent(ptr)) {
- ir_entity *ent = get_SymConst_entity(ptr);
+ if (is_Global(ptr)) {
+ ir_entity *ent = get_Global_entity(ptr);
prop = get_entity_additional_properties(ent);
}
} else if (is_Load(pred) && get_Load_ptr(pred) == ptr &&
value == pred_info->projs[pn_Load_res]) {
/*
- * a Store of a value after a Load -- a write after read.
- * We may remove the second Store, if it does not have an exception handler.
+ * a Store of a value just loaded from the same address
+ * -- a write after read.
+ * We may remove the Store, if it does not have an exception
+ * handler.
*/
if (! info->projs[pn_Store_X_except]) {
DBG_OPT_WAR(store, pred);
break;
pred = skip_Proj(get_Store_mem(pred));
} else if (get_irn_op(pred) == op_Load) {
+ ir_alias_relation rel = get_alias_relation(
+ current_ir_graph, get_Load_ptr(pred), get_Load_mode(pred),
+ ptr, mode);
+ if (rel != no_alias)
+ break;
+
pred = skip_Proj(get_Load_mem(pred));
} else {
/* follow only Load chains */
if (info->projs[pn_Load_res] == NULL || info->projs[pn_Load_X_regular] != NULL || info->projs[pn_Load_X_except] != NULL)
continue;
- /* for now, we can only handle Load(SymConst) */
- if (! is_SymConst_addr_ent(ptr))
+ /* for now, we can only handle Load(Global) */
+ if (! is_Global(ptr))
continue;
- ent = get_SymConst_entity(ptr);
+ ent = get_Global_entity(ptr);
load_mode = get_Load_mode(load);
for (other = pscc->head; other != NULL; other = next_other) {
node_entry *ne = get_irn_ne(other, env);