mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
nir: always attempt to find loop terminators
This will help later patches with unrolling loops that end with a break i.e. loops the always exit on their first interation. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
1e40f69483
commit
fef6325e58
1 changed files with 7 additions and 7 deletions
|
|
@ -717,13 +717,6 @@ get_loop_info(loop_info_state *state, nir_function_impl *impl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Induction analysis needs invariance information so get that first */
|
|
||||||
compute_invariance_information(state);
|
|
||||||
|
|
||||||
/* We have invariance information so try to find induction variables */
|
|
||||||
if (!compute_induction_information(state))
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* Try to find all simple terminators of the loop. If we can't find any,
|
/* Try to find all simple terminators of the loop. If we can't find any,
|
||||||
* or we find possible terminators that have side effects then bail.
|
* or we find possible terminators that have side effects then bail.
|
||||||
*/
|
*/
|
||||||
|
|
@ -737,6 +730,13 @@ get_loop_info(loop_info_state *state, nir_function_impl *impl)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Induction analysis needs invariance information so get that first */
|
||||||
|
compute_invariance_information(state);
|
||||||
|
|
||||||
|
/* We have invariance information so try to find induction variables */
|
||||||
|
if (!compute_induction_information(state))
|
||||||
|
return;
|
||||||
|
|
||||||
/* Run through each of the terminators and try to compute a trip-count */
|
/* Run through each of the terminators and try to compute a trip-count */
|
||||||
find_trip_count(state);
|
find_trip_count(state);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue