nir: Drop unused name from nir_ssa_dest_init
Since 624e799cc3
("nir: Drop nir_ssa_def::name and nir_register::name"), SSA
defs don't have names, making the name argument unused. Drop it from the
signature and fix the call sites. This was done with the help of the following
Coccinelle semantic patch:
@@
expression A, B, C, D, E;
@@
-nir_ssa_dest_init(A, B, C, D, E);
+nir_ssa_dest_init(A, B, C, D);
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23078>
This commit is contained in:

committed by
Marge Bot

parent
7adf6c75ef
commit
01e9ee79f7
@@ -114,7 +114,7 @@ implement_sub_group_ballot_builtin(nir_function *func)
|
||||
nir_intrinsic_instr_create(b.shader, nir_intrinsic_ballot);
|
||||
ballot->src[0] = nir_src_for_ssa(cond);
|
||||
ballot->num_components = 1;
|
||||
nir_ssa_dest_init(&ballot->instr, &ballot->dest, 1, 32, NULL);
|
||||
nir_ssa_dest_init(&ballot->instr, &ballot->dest, 1, 32);
|
||||
nir_builder_instr_insert(&b, &ballot->instr);
|
||||
|
||||
nir_store_deref(&b, ret, &ballot->dest.ssa, ~0);
|
||||
@@ -189,7 +189,7 @@ lower_kernel_intrinsics(nir_shader *nir)
|
||||
nir_intrinsic_set_range(load, nir->num_uniforms);
|
||||
nir_ssa_dest_init(&load->instr, &load->dest,
|
||||
intrin->dest.ssa.num_components,
|
||||
intrin->dest.ssa.bit_size, NULL);
|
||||
intrin->dest.ssa.bit_size);
|
||||
nir_builder_instr_insert(&b, &load->instr);
|
||||
|
||||
nir_ssa_def_rewrite_uses(&intrin->dest.ssa, &load->dest.ssa);
|
||||
@@ -217,7 +217,7 @@ lower_kernel_intrinsics(nir_shader *nir)
|
||||
nir_intrinsic_set_base(load, kernel_sysvals_start +
|
||||
offsetof(struct brw_kernel_sysvals, num_work_groups));
|
||||
nir_intrinsic_set_range(load, 3 * 4);
|
||||
nir_ssa_dest_init(&load->instr, &load->dest, 3, 32, NULL);
|
||||
nir_ssa_dest_init(&load->instr, &load->dest, 3, 32);
|
||||
nir_builder_instr_insert(&b, &load->instr);
|
||||
|
||||
/* We may need to do a bit-size cast here */
|
||||
|
@@ -334,7 +334,7 @@ brw_nir_lower_vs_inputs(nir_shader *nir,
|
||||
}
|
||||
|
||||
load->num_components = 1;
|
||||
nir_ssa_dest_init(&load->instr, &load->dest, 1, 32, NULL);
|
||||
nir_ssa_dest_init(&load->instr, &load->dest, 1, 32);
|
||||
nir_builder_instr_insert(&b, &load->instr);
|
||||
|
||||
nir_ssa_def_rewrite_uses(&intrin->dest.ssa,
|
||||
|
@@ -51,8 +51,7 @@ _load_image_param(nir_builder *b, nir_deref_instr *deref, unsigned offset)
|
||||
default:
|
||||
unreachable("Invalid param offset");
|
||||
}
|
||||
nir_ssa_dest_init(&load->instr, &load->dest,
|
||||
load->num_components, 32, NULL);
|
||||
nir_ssa_dest_init(&load->instr, &load->dest, load->num_components, 32);
|
||||
|
||||
nir_builder_instr_insert(b, &load->instr);
|
||||
return &load->dest.ssa;
|
||||
|
@@ -241,8 +241,7 @@ brw_nir_opt_peephole_ffma_instr(nir_builder *b,
|
||||
assert(add->dest.dest.is_ssa);
|
||||
|
||||
nir_ssa_dest_init(&ffma->instr, &ffma->dest.dest,
|
||||
add->dest.dest.ssa.num_components,
|
||||
bit_size, NULL);
|
||||
add->dest.dest.ssa.num_components, bit_size);
|
||||
nir_ssa_def_rewrite_uses(&add->dest.dest.ssa, &ffma->dest.dest.ssa);
|
||||
|
||||
nir_builder_instr_insert(b, &ffma->instr);
|
||||
|
@@ -48,8 +48,7 @@ replace_imul_instr(nir_builder *b, nir_alu_instr *imul, unsigned small_val,
|
||||
nir_alu_src_copy(&imul_32x16->src[1], &imul->src[small_val], imul_32x16);
|
||||
|
||||
nir_ssa_dest_init(&imul_32x16->instr, &imul_32x16->dest.dest,
|
||||
imul->dest.dest.ssa.num_components,
|
||||
32, NULL);
|
||||
imul->dest.dest.ssa.num_components, 32);
|
||||
|
||||
nir_ssa_def_rewrite_uses(&imul->dest.dest.ssa,
|
||||
&imul_32x16->dest.dest.ssa);
|
||||
|
Reference in New Issue
Block a user