mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-09 18:48:18 +02:00
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:
parent
b494faa12d
commit
381bc06c4a
1 changed files with 5 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue