nir: Remove reg_intrinsics parameter to convert_from_ssa

All users must set it.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24450>
This commit is contained in:
Alyssa Rosenzweig
2023-08-01 10:35:21 -04:00
parent 11a161b9b9
commit 17d66055ae
14 changed files with 21 additions and 26 deletions
+2 -4
View File
@@ -5992,12 +5992,10 @@ nir_rewrite_uses_to_load_reg(struct nir_builder *b, nir_ssa_def *old,
/* If phi_webs_only is true, only convert SSA values involved in phi nodes to
* registers. If false, convert all values (even those not involved in a phi
* node) to registers. If reg_intrinsics is true, it will use
* decl/load/store_reg intrinsics instead of nir_register.
* node) to registers.
*/
bool nir_convert_from_ssa(nir_shader *shader,
bool phi_webs_only,
bool reg_intrinsics);
bool phi_webs_only);
bool nir_lower_phis_to_regs_block(nir_block *block);
bool nir_lower_ssa_defs_to_regs_block(nir_block *block);
+5 -8
View File
@@ -1334,8 +1334,7 @@ resolve_parallel_copies_block(nir_block *block, struct from_ssa_state *state)
static bool
nir_convert_from_ssa_impl(nir_function_impl *impl,
bool phi_webs_only,
bool reg_intrinsics)
bool phi_webs_only)
{
nir_shader *shader = impl->function->shader;
@@ -1344,7 +1343,7 @@ nir_convert_from_ssa_impl(nir_function_impl *impl,
state.builder = nir_builder_create(impl);
state.dead_ctx = ralloc_context(NULL);
state.phi_webs_only = phi_webs_only;
state.reg_intrinsics = reg_intrinsics;
state.reg_intrinsics = true;
state.merge_node_table = _mesa_pointer_hash_table_create(NULL);
state.progress = false;
exec_list_make_empty(&state.dead_instrs);
@@ -1374,7 +1373,7 @@ nir_convert_from_ssa_impl(nir_function_impl *impl,
aggressive_coalesce_block(block, &state);
}
if (reg_intrinsics) {
if (state.reg_intrinsics) {
resolve_registers_impl(impl, &state);
} else {
nir_foreach_block(block, impl) {
@@ -1398,14 +1397,12 @@ nir_convert_from_ssa_impl(nir_function_impl *impl,
bool
nir_convert_from_ssa(nir_shader *shader,
bool phi_webs_only,
bool reg_intrinsics)
bool phi_webs_only)
{
bool progress = false;
nir_foreach_function_impl(impl, shader) {
progress |= nir_convert_from_ssa_impl(impl, phi_webs_only,
reg_intrinsics);
progress |= nir_convert_from_ssa_impl(impl, phi_webs_only);
}
return progress;