nir: Use nir_foreach_phi(_safe)
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Thu, 11 May 2023 17:20:43 +0000 (13:20 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 12 May 2023 14:02:23 +0000 (14:02 +0000)
commitaa6bdbd54a4c824661e4b65eb4fc6a357058f778
tree9c84dc5adf61c3f47523b5f129c00da064450642
parent7dc297cc14196ec1f9a4908395d89dfd00de859a
nir: Use nir_foreach_phi(_safe)

The pattern shows up all the time open-coded. Use the macro instead.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22967>
15 files changed:
src/compiler/nir/nir.c
src/compiler/nir/nir.h
src/compiler/nir/nir_control_flow.c
src/compiler/nir/nir_divergence_analysis.c
src/compiler/nir/nir_from_ssa.c
src/compiler/nir/nir_liveness.c
src/compiler/nir/nir_lower_phis_to_scalar.c
src/compiler/nir/nir_lower_shader_calls.c
src/compiler/nir/nir_opt_conditional_discard.c
src/compiler/nir/nir_opt_dead_cf.c
src/compiler/nir/nir_opt_if.c
src/compiler/nir/nir_opt_peephole_select.c
src/compiler/nir/nir_opt_phi_precision.c
src/compiler/nir/nir_opt_remove_phis.c
src/compiler/nir/nir_validate.c