Lines Matching defs:loop

38    nir_ssa_def *def_outside_loop;           /* The phi-src outside the loop */
59 /* True if variable is in a nested loop */
68 /* The loop we store information for */
69 nir_loop *loop;
124 * the defs in the loop instead of the end when walking the list. This
140 * have to be massively accurate; they just have to be good enough that loop
219 state->loop->info->instr_cost += instr_cost(instr, options);
279 /* An expression is invariant in a loop L if:
284 * – it’s a pure computation all of whose args are loop invariant
286 * rhs of that def is loop-invariant
400 /* If one of the sources is in an if branch or nested loop then don't
407 * of an unnested if rather than in a loop block.
495 nir_loop_info *info = state->loop->info;
525 foreach_list_typed_safe(nir_cf_node, node, node, &state->loop->body) {
545 * not find a loop terminator, but there is a break-statement then
549 state->loop->info->complex_loop = true;
558 state->loop->info->complex_loop = true;
563 rzalloc(state->loop->info, nir_loop_terminator);
566 &state->loop->info->loop_terminator_list);
581 /* This function looks for an array access within a loop that uses an
623 nir_foreach_block_in_cf_node(block, &state->loop->cf_node) {
630 /* Check for arrays variably-indexed by a loop induction variable. */
795 /* Evaluate the loop exit condition */
844 /* Evaluate the loop exit condition */
883 * Here we check if the induction variable is used directly by the loop
899 * however if the loop condition is false on the first iteration
912 /* If iter_int is negative the loop is ill-formed or is the conditional is
923 * loop does not have a maximum iteration count.
1021 /* If the loop is not breaking on (x && y) == 0 then return */
1052 /* Run through each of the terminators of the loop and try to infer a possible
1054 * trip-count of our loop. If one of the terminators has an undecidable
1056 * loop.
1067 &state->loop->info->loop_terminator_list,
1073 /* If we get here the loop is dead and will get cleaned up by the
1090 /* The loop is exiting on (x && y) == 0 so we need to get the
1117 /* Attempt to find a constant limit for the loop */
1125 /* Guess loop limit based on array access */
1189 if (state->loop->info->guessed_trip_count == 0 ||
1190 state->loop->info->guessed_trip_count > iterations)
1191 state->loop->info->guessed_trip_count = iterations;
1206 state->loop->info->exact_trip_count_known = trip_count_known;
1208 state->loop->info->max_trip_count = max_trip_count;
1209 state->loop->info->limiting_terminator = limiting_terminator;
1218 if ((array_size == state->loop->info->max_trip_count) &&
1260 /* Check for arrays variably-indexed by a loop induction variable.
1261 * Unrolling the loop may convert that access into constant-indexing.
1288 /* Add all entries in the outermost part of the loop to the processing list
1291 foreach_list_typed_safe(nir_cf_node, node, node, &state->loop->body) {
1315 /* Try to find all simple terminators of the loop. If we can't find any,
1320 &state->loop->info->loop_terminator_list,
1338 nir_foreach_block_in_cf_node(block, &state->loop->cf_node) {
1340 state->loop->info->force_unroll = true;
1347 initialize_loop_info_state(nir_loop *loop, void *mem_ctx,
1355 state->loop = loop;
1359 if (loop->info)
1360 ralloc_free(loop->info);
1362 loop->info = rzalloc(loop, nir_loop_info);
1364 list_inithead(&loop->info->loop_terminator_list);
1385 nir_loop *loop = nir_cf_node_as_loop(cf_node);
1386 foreach_list_typed(nir_cf_node, nested_node, node, &loop->body)
1394 nir_loop *loop = nir_cf_node_as_loop(cf_node);
1398 loop_info_state *state = initialize_loop_info_state(loop, mem_ctx, impl);