+ avail_entry_t entry, *res;
+
+ entry.ptr = ptr;
+ entry.mode = load_mode;
+ res = (avail_entry_t*)set_find(avail, &entry, sizeof(entry), hash_cache_entry(&entry));
+ if (res != NULL) {
+ irn = res->load;
+ } else {
+ irn = new_rd_Load(db, pred, get_Phi_pred(phi, pos), ptr, load_mode, cons_none);
+ entry.load = irn;
+ set_insert(avail, &entry, sizeof(entry), hash_cache_entry(&entry));
+ DB((dbg, LEVEL_1, " Created %+F in %+F\n", irn, pred));
+ }
+ pe->load = irn;
+ ninfo = get_ldst_info(irn, &env->obst);
+
+ ninfo->projs[pn_Load_M] = mem = new_r_Proj(irn, mode_M, pn_Load_M);
+ if (res == NULL) {
+ /* irn is from cache, so do not set phi pred again.
+ * There might be other Loads between phi and irn already.
+ */
+ set_Phi_pred(phi, pos, mem);
+ }