nak: Report progress from nak_nir_rematerialize_load_const()

Fixes: 8fffcdb18b ("nak/nir: Re-materialize load_const instructions in use blocks")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40464>
This commit is contained in:
Faith Ekstrand 2026-03-17 11:07:49 -04:00 committed by Marge Bot
parent b494faa12d
commit 381bc06c4a

View file

@ -43,13 +43,12 @@ rematerialize_load_const(nir_src *src, void *_ctx)
static bool
rematerialize_load_const_impl(nir_function_impl *impl)
{
bool progress = false;
struct remat_ctx ctx = {
.remap = _mesa_pointer_hash_table_create(NULL),
.b = nir_builder_create(impl),
};
bool progress = false;
nir_foreach_block(block, impl) {
_mesa_hash_table_clear(ctx.remap, NULL);
ctx.block = block;
@ -82,12 +81,14 @@ rematerialize_load_const_impl(nir_function_impl *impl)
}
}
}
if (ctx.remap->entries > 0)
progress = true;
}
_mesa_hash_table_destroy(ctx.remap, NULL);
return nir_progress(progress, impl, nir_metadata_control_flow |
nir_metadata_divergence);
return nir_progress(progress, impl, nir_metadata_control_flow);
}
bool