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
+6 -6
View File
@@ -29,7 +29,7 @@
#include "nir_builder.h"
static nir_alu_instr *
get_parent_mov(nir_ssa_def *ssa)
get_parent_mov(nir_def *ssa)
{
if (ssa->parent_instr->type != nir_instr_type_alu)
return NULL;
@@ -39,7 +39,7 @@ get_parent_mov(nir_ssa_def *ssa)
}
static bool
matching_mov(nir_alu_instr *mov1, nir_ssa_def *ssa)
matching_mov(nir_alu_instr *mov1, nir_def *ssa)
{
if (!mov1)
return false;
@@ -69,7 +69,7 @@ remove_phis_block(nir_block *block, nir_builder *b)
bool progress = false;
nir_foreach_phi_safe(phi, block) {
nir_ssa_def *def = NULL;
nir_def *def = NULL;
nir_alu_instr *mov = NULL;
bool srcs_same = true;
@@ -109,8 +109,8 @@ remove_phis_block(nir_block *block, nir_builder *b)
/* In this case, the phi had no sources. So turn it into an undef. */
b->cursor = nir_after_phis(block);
def = nir_ssa_undef(b, phi->dest.ssa.num_components,
phi->dest.ssa.bit_size);
def = nir_undef(b, phi->dest.ssa.num_components,
phi->dest.ssa.bit_size);
} else if (mov) {
/* If the sources were all movs from the same source with the same
* swizzle, then we can't just pick a random move because it may not
@@ -124,7 +124,7 @@ remove_phis_block(nir_block *block, nir_builder *b)
def = nir_mov_alu(b, mov->src[0], def->num_components);
}
nir_ssa_def_rewrite_uses(&phi->dest.ssa, def);
nir_def_rewrite_uses(&phi->dest.ssa, def);
nir_instr_remove(&phi->instr);
progress = true;