nir/gather_types: Support unstructured control-flow

This fixes nir_print for unstructured control-flow.  It's safe to
backport just this patch because the worst case is that we don't set as
many types and not as much gets printed.

Fixes: 260a9167db ("nir/print: Improve NIR_PRINT=print_consts by using nir_gather_ssa_types()")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
This commit is contained in:
Faith Ekstrand 2024-03-18 19:17:19 -05:00 committed by Marge Bot
parent 3293248439
commit 2be97717e6

View file

@ -103,7 +103,7 @@ nir_gather_types(nir_function_impl *impl,
do {
progress = false;
nir_foreach_block(block, impl) {
nir_foreach_block_unstructured(block, impl) {
nir_foreach_instr(instr, block) {
switch (instr->type) {
case nir_instr_type_alu: {