nir: Drop "SSA" from NIR language

Everything is SSA now.

   sed -e 's/nir_ssa_def/nir_def/g' \
       -e 's/nir_ssa_undef/nir_undef/g' \
       -e 's/nir_ssa_scalar/nir_scalar/g' \
       -e 's/nir_src_rewrite_ssa/nir_src_rewrite/g' \
       -e 's/nir_gather_ssa_types/nir_gather_types/g' \
       -i $(git grep -l nir | grep -v relnotes)

   git mv src/compiler/nir/nir_gather_ssa_types.c \
          src/compiler/nir/nir_gather_types.c

   ninja -C build/ clang-format
   cd src/compiler/nir && find *.c *.h -type f -exec clang-format -i \{} \;

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24585>
This commit is contained in:
Alyssa Rosenzweig
2023-08-12 16:17:15 -04:00
parent 777d336b1f
commit 09d31922de
492 changed files with 10408 additions and 10455 deletions
+10 -10
View File
@@ -223,10 +223,10 @@ nir_insert_phi_undef(nir_block *block, nir_block *pred)
{
nir_function_impl *impl = nir_cf_node_get_function(&block->cf_node);
nir_foreach_phi(phi, block) {
nir_ssa_undef_instr *undef =
nir_ssa_undef_instr_create(impl->function->shader,
phi->dest.ssa.num_components,
phi->dest.ssa.bit_size);
nir_undef_instr *undef =
nir_undef_instr_create(impl->function->shader,
phi->dest.ssa.num_components,
phi->dest.ssa.bit_size);
nir_instr_insert_before_cf_list(&impl->body, &undef->instr);
nir_phi_src *src = nir_phi_instr_add_src(phi, pred, nir_src_for_ssa(&undef->def));
list_addtail(&src->src.use_link, &undef->def.uses);
@@ -641,16 +641,16 @@ nir_cf_node_insert(nir_cursor cursor, nir_cf_node *node)
}
static bool
replace_ssa_def_uses(nir_ssa_def *def, void *void_impl)
replace_ssa_def_uses(nir_def *def, void *void_impl)
{
nir_function_impl *impl = void_impl;
nir_ssa_undef_instr *undef =
nir_ssa_undef_instr_create(impl->function->shader,
def->num_components,
def->bit_size);
nir_undef_instr *undef =
nir_undef_instr_create(impl->function->shader,
def->num_components,
def->bit_size);
nir_instr_insert_before_cf_list(&impl->body, &undef->instr);
nir_ssa_def_rewrite_uses(def, &undef->def);
nir_def_rewrite_uses(def, &undef->def);
return true;
}