agx: Re-index nir defs to reduce memory usage

nir_index_ssa_defs(..) will re-index the function impl and will
update ssa_alloc. In almost all cases this will result in a lower
ctx->alloc number which reduces memory usage in compiler passes
that are using ctx-alloc to allocate memory.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056>
This commit is contained in:
Christian Gmeiner
2023-09-27 09:59:35 +02:00
committed by Marge Bot
parent b6b01aa1f2
commit e928f45735

View File

@@ -2619,6 +2619,7 @@ agx_compile_function_nir(nir_shader *nir, nir_function_impl *impl,
struct agx_shader_info *out)
{
nir_index_blocks(impl);
nir_index_ssa_defs(impl);
agx_context *ctx = rzalloc(NULL, agx_context);
ctx->nir = nir;