/* a Load which value is neither used nor exception checked, remove it */
exchange(info->projs[pn_Load_M], mem);
- exchange(info->projs[pn_Load_X_regular], new_r_Jmp(current_ir_graph, get_nodes_block(load)));
+ if (info->projs[pn_Load_X_regular])
+ exchange(info->projs[pn_Load_X_regular], new_r_Jmp(current_ir_graph, get_nodes_block(load)));
exchange(load, new_Bad());
reduce_adr_usage(ptr);
}
if (! is_SymConst(ptr) || get_SymConst_kind(ptr) != symconst_addr_ent)
continue;
ent = get_SymConst_entity(ptr);
-
load_mode = get_Load_mode(load);
- if (get_entity_address_taken(ent) == ir_address_not_taken) {
- /* Shortcut: If the addres is never taken, this address if complete alias free*/
- goto can_move;
- }
-
for (other = pscc->head; other != NULL; other = next_other) {
node_entry *ne = get_irn_ne(other, env);
next_other = ne->next;
ldst_info_t *ninfo;
phi_entry *pe;
dbg_info *db;
-can_move:
+
/* for now, we cannot handle more than one input */
if (phi_list->next != NULL)
return;
ir_node *irn, *mem;
pe->load = irn = new_rd_Load(db, current_ir_graph, pred, get_Phi_pred(phi, pos), ptr, load_mode);
- ninfo = get_ldst_info(pred, phase_obst(&env->ph));
+ ninfo = get_ldst_info(irn, phase_obst(&env->ph));
ninfo->projs[pn_Load_M] = mem = new_r_Proj(current_ir_graph, pred, irn, mode_M, pn_Load_M);
set_Phi_pred(phi, pos, mem);
walk_env_t env;
FIRM_DBG_REGISTER(dbg, "firm.opt.ldstopt");
- firm_dbg_set_mask(dbg, SET_LEVEL_1);
+// firm_dbg_set_mask(dbg, SET_LEVEL_1);
assert(get_irg_phase_state(irg) != phase_building);
assert(get_irg_pinned(irg) != op_pin_state_floats &&