+ unsigned hash = HASH_COMBINE(hash_irn(block), hash_irn(def));
+ be_use_t temp;
+ be_use_t* result;
+
+ temp.block = block;
+ temp.node = def;
+ result = set_find(env->uses, &temp, sizeof(temp), hash);
+
+ if(result == NULL) {
+ // insert templ first as we might end in a loop in the get_next_use
+ // call otherwise
+ temp.next_use = USES_INFINITY;
+ temp.outermost_loop = -1;
+ temp.visited = 0;
+ result = set_insert(env->uses, &temp, sizeof(temp), hash);
+ }
+
+ if(result->outermost_loop < 0 && result->visited < env->visited_counter) {
+ be_next_use_t next_use;
+
+ result->visited = env->visited_counter;
+ next_use = get_next_use(env, sched_first(block), 0, def, 0);
+ if(next_use.outermost_loop >= 0) {
+ result->next_use = next_use.time;
+ result->outermost_loop = next_use.outermost_loop;
+ DBG((env->dbg, LEVEL_5, "Setting nextuse of %+F in block %+F to %u (outermostloop %d)\n", def, block, result->next_use, result->outermost_loop));
+ }
+ }
+
+ return result;