I copy-and-pasted one of these and people noted that we had a better tool,
so make sure nobody else copy and pastes it.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17664>
*/
nir_instr_insert_after_block(nblk, &nphi->instr);
- foreach_list_typed(nir_phi_src, src, node, &phi->srcs) {
+ nir_foreach_phi_src(src, phi) {
nir_phi_src *nsrc = nir_phi_instr_add_src(nphi, src->pred, src->src);
/* Stash it in the list of phi sources. We'll walk this list and fix up
nir_phi_instr *phi = nir_instr_as_phi(instr);
- foreach_list_typed(nir_phi_src, src, node, &phi->srcs) {
+ nir_foreach_phi_src(src, phi) {
if (src->pred == old_then_block) {
src->pred = new_then_block;
} else if (src->pred == old_else_block) {