nir/loop_analyze: Use try_eval_const_alu and induction variable basis info
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 14 Feb 2023 01:33:29 +0000 (17:33 -0800)
committerMarge Bot <emma+marge@anholt.net>
Thu, 6 Apr 2023 23:50:27 +0000 (23:50 +0000)
commitbc170e895f384acf24c849798fcff092db440135
tree5c717d360a9f0aca08cb63678240c0abcda884dc
parent99a7a6648de38f79aa06dabad010ec191aae18f4
nir/loop_analyze: Use try_eval_const_alu and induction variable basis info

This dramatically simplifies will_break_on_first_iteration, and, much
more importantly, makes it significantly more flexible. It is now
possible to handle loops with more complex exit condition and other
kinds of increment operations.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3445>
src/compiler/nir/nir_loop_analyze.c