summaryrefslogtreecommitdiff
path: root/src/compiler/nir/nir_validate.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>2023-06-22 13:27:59 -0400
committerMarge Bot <emma+marge@anholt.net>2023-06-27 22:44:04 +0000
commit190b1fdc643b82e25347926717712c92cdfe0fc1 (patch)
treeec7d364110b6a63a52afe18fd94faf4844ad2e3e /src/compiler/nir/nir_validate.c
parent19daa9283c146a8c50fdc0250e73a0bc366c826b (diff)
nir: Convert to nir_foreach_function_impl
Done by hand at each call site but going very quickly with funny Vim motions and common regexes. This is a very common idiom in NIR. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23807>
Diffstat (limited to 'src/compiler/nir/nir_validate.c')
-rw-r--r--src/compiler/nir/nir_validate.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c
index 81f63046066..1776bad7db7 100644
--- a/src/compiler/nir/nir_validate.c
+++ b/src/compiler/nir/nir_validate.c
@@ -1840,18 +1840,15 @@ nir_validate_ssa_dominance(nir_shader *shader, const char *when)
state.shader = shader;
- nir_foreach_function(func, shader) {
- if (func->impl == NULL)
- continue;
-
+ nir_foreach_function_impl(impl, shader) {
state.ssa_defs_found = reralloc(state.mem_ctx, state.ssa_defs_found,
BITSET_WORD,
- BITSET_WORDS(func->impl->ssa_alloc));
- memset(state.ssa_defs_found, 0, BITSET_WORDS(func->impl->ssa_alloc) *
+ BITSET_WORDS(impl->ssa_alloc));
+ memset(state.ssa_defs_found, 0, BITSET_WORDS(impl->ssa_alloc) *
sizeof(BITSET_WORD));
- state.impl = func->impl;
- validate_ssa_dominance(func->impl, &state);
+ state.impl = impl;
+ validate_ssa_dominance(impl, &state);
}
if (_mesa_hash_table_num_entries(state.errors) > 0)