From 65b6ac8aa4554987867a4dbd463a5914135efd22 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Tue, 15 Aug 2023 09:59:06 -0500 Subject: [PATCH] nir: Rename nir_instr_type_ssa_undef to nir_instr_type_undef We already renamed the type, we just need to rename the enum and the casting helper functions. Generated with sed: sed -i -e 's/nir_instr_type_ssa_undef/nir_instr_type_undef/g' src/**/*.h src/**/*.c src/**/*.cpp sed -i -e 's/nir_instr_as_ssa_undef/nir_instr_as_undef/g' src/**/*.h src/**/*.c src/**/*.cpp and two tiny whitespace fixups in lima. Reviewed-by: Alyssa Rosenzweig Part-of: --- src/amd/common/ac_nir_opt_outputs.c | 2 +- src/amd/compiler/aco_instruction_selection.cpp | 4 ++-- src/amd/compiler/aco_instruction_selection_setup.cpp | 8 ++++---- src/amd/llvm/ac_nir_to_llvm.c | 4 ++-- src/asahi/compiler/agx_compile.c | 4 ++-- src/broadcom/compiler/nir_to_vir.c | 4 ++-- src/broadcom/compiler/vir.c | 2 +- src/compiler/nir/nir.c | 6 +++--- src/compiler/nir/nir.h | 10 +++++----- src/compiler/nir/nir_clone.c | 4 ++-- src/compiler/nir/nir_divergence_analysis.c | 6 +++--- src/compiler/nir/nir_from_ssa.c | 12 ++++++------ src/compiler/nir/nir_group_loads.c | 2 +- src/compiler/nir/nir_inline_helpers.h | 6 +++--- src/compiler/nir/nir_instr_set.c | 4 ++-- src/compiler/nir/nir_liveness.c | 4 ++-- src/compiler/nir/nir_lower_array_deref_of_vec.c | 2 +- src/compiler/nir/nir_lower_bool_to_bitsize.c | 2 +- src/compiler/nir/nir_lower_bool_to_float.c | 2 +- src/compiler/nir/nir_lower_bool_to_int32.c | 2 +- src/compiler/nir/nir_lower_int_to_float.c | 2 +- src/compiler/nir/nir_lower_phis_to_scalar.c | 2 +- src/compiler/nir/nir_lower_shader_calls.c | 2 +- src/compiler/nir/nir_lower_undef_to_zero.c | 4 ++-- src/compiler/nir/nir_lower_vec_to_regs.c | 2 +- src/compiler/nir/nir_opt_dce.c | 4 ++-- src/compiler/nir/nir_opt_gcm.c | 4 ++-- src/compiler/nir/nir_opt_if.c | 2 +- src/compiler/nir/nir_opt_move_discards_to_top.c | 2 +- src/compiler/nir/nir_opt_peephole_select.c | 4 ++-- src/compiler/nir/nir_opt_preamble.c | 4 ++-- src/compiler/nir/nir_opt_shrink_vectors.c | 4 ++-- src/compiler/nir/nir_opt_sink.c | 2 +- src/compiler/nir/nir_opt_undef.c | 8 ++++---- src/compiler/nir/nir_print.c | 6 +++--- src/compiler/nir/nir_propagate_invariant.c | 2 +- src/compiler/nir/nir_schedule.c | 4 ++-- src/compiler/nir/nir_serialize.c | 6 +++--- src/compiler/nir/nir_to_lcssa.c | 2 +- src/compiler/nir/nir_trivialize_registers.c | 2 +- src/compiler/nir/nir_validate.c | 4 ++-- src/freedreno/ir3/ir3_compiler_nir.c | 6 +++--- src/freedreno/ir3/ir3_nir_lower_64b.c | 6 +++--- src/freedreno/ir3/ir3_nir_move_varying_inputs.c | 2 +- src/gallium/auxiliary/gallivm/lp_bld_nir.c | 4 ++-- src/gallium/auxiliary/nir/nir_to_tgsi.c | 6 +++--- src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c | 4 ++-- .../drivers/etnaviv/etnaviv_compiler_nir_liveness.c | 2 +- src/gallium/drivers/freedreno/a2xx/ir2_nir.c | 4 ++-- src/gallium/drivers/lima/ir/gp/nir.c | 2 +- src/gallium/drivers/lima/ir/pp/nir.c | 4 ++-- src/gallium/drivers/r600/sfn/sfn_instrfactory.cpp | 4 ++-- src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp | 8 ++++---- src/gallium/drivers/vc4/vc4_program.c | 4 ++-- src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 4 ++-- src/intel/compiler/brw_fs_nir.cpp | 2 +- src/intel/compiler/brw_vec4_nir.cpp | 4 ++-- src/microsoft/compiler/nir_to_dxil.c | 4 ++-- src/nouveau/codegen/nv50_ir_from_nir.cpp | 4 ++-- src/panfrost/midgard/midgard_compile.c | 2 +- 60 files changed, 119 insertions(+), 119 deletions(-) diff --git a/src/amd/common/ac_nir_opt_outputs.c b/src/amd/common/ac_nir_opt_outputs.c index aa4b4f592c9..b622a1bf25e 100644 --- a/src/amd/common/ac_nir_opt_outputs.c +++ b/src/amd/common/ac_nir_opt_outputs.c @@ -271,7 +271,7 @@ bool ac_nir_optimize_outputs(nir_shader *nir, bool sprite_tex_disallowed, /* nir_lower_io_to_scalar is required before this */ assert(intr->src[0].ssa->num_components == 1); /* No intrinsic should store undef. */ - assert(intr->src[0].ssa->parent_instr->type != nir_instr_type_ssa_undef); + assert(intr->src[0].ssa->parent_instr->type != nir_instr_type_undef); /* Gather the output. */ struct ac_out_info *out_info = &outputs[sem.location]; diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 7226565825a..b22111f90fc 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -9742,7 +9742,7 @@ Operand get_phi_operand(isel_context* ctx, nir_def* ssa, RegClass rc, bool logical) { Temp tmp = get_ssa_temp(ctx, ssa); - if (ssa->parent_instr->type == nir_instr_type_ssa_undef) { + if (ssa->parent_instr->type == nir_instr_type_undef) { return Operand(rc); } else if (logical && ssa->bit_size == 1 && ssa->parent_instr->type == nir_instr_type_load_const) { @@ -10093,7 +10093,7 @@ visit_block(isel_context* ctx, nir_block* block) case nir_instr_type_intrinsic: visit_intrinsic(ctx, nir_instr_as_intrinsic(instr)); break; case nir_instr_type_tex: visit_tex(ctx, nir_instr_as_tex(instr)); break; case nir_instr_type_phi: visit_phi(ctx, nir_instr_as_phi(instr)); break; - case nir_instr_type_ssa_undef: visit_undef(ctx, nir_instr_as_ssa_undef(instr)); break; + case nir_instr_type_undef: visit_undef(ctx, nir_instr_as_undef(instr)); break; case nir_instr_type_deref: break; case nir_instr_type_jump: visit_jump(ctx, nir_instr_as_jump(instr)); break; default: isel_err(instr, "Unknown NIR instr type"); diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp index a524069097e..c87572a2365 100644 --- a/src/amd/compiler/aco_instruction_selection_setup.cpp +++ b/src/amd/compiler/aco_instruction_selection_setup.cpp @@ -590,11 +590,11 @@ init_context(isel_context* ctx, nir_shader* shader) regclasses[tex->def.index] = rc; break; } - case nir_instr_type_ssa_undef: { - unsigned num_components = nir_instr_as_ssa_undef(instr)->def.num_components; - unsigned bit_size = nir_instr_as_ssa_undef(instr)->def.bit_size; + case nir_instr_type_undef: { + unsigned num_components = nir_instr_as_undef(instr)->def.num_components; + unsigned bit_size = nir_instr_as_undef(instr)->def.bit_size; RegClass rc = get_reg_class(ctx, RegType::sgpr, num_components, bit_size); - regclasses[nir_instr_as_ssa_undef(instr)->def.index] = rc; + regclasses[nir_instr_as_undef(instr)->def.index] = rc; break; } case nir_instr_type_phi: { diff --git a/src/amd/llvm/ac_nir_to_llvm.c b/src/amd/llvm/ac_nir_to_llvm.c index cc16a1fe2b5..3d62d8da4ef 100644 --- a/src/amd/llvm/ac_nir_to_llvm.c +++ b/src/amd/llvm/ac_nir_to_llvm.c @@ -4227,8 +4227,8 @@ static bool visit_block(struct ac_nir_context *ctx, nir_block *block) break; case nir_instr_type_phi: break; - case nir_instr_type_ssa_undef: - visit_ssa_undef(ctx, nir_instr_as_ssa_undef(instr)); + case nir_instr_type_undef: + visit_ssa_undef(ctx, nir_instr_as_undef(instr)); break; case nir_instr_type_jump: if (!visit_jump(&ctx->ac, nir_instr_as_jump(instr))) diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index d66297300d8..405f75bdba9 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -1834,8 +1834,8 @@ agx_emit_instr(agx_builder *b, struct nir_instr *instr) agx_emit_phi(b, nir_instr_as_phi(instr)); break; - case nir_instr_type_ssa_undef: - agx_emit_undef(b, nir_instr_as_ssa_undef(instr)); + case nir_instr_type_undef: + agx_emit_undef(b, nir_instr_as_undef(instr)); break; default: diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c index 4120b3d0000..89d58f9a87d 100644 --- a/src/broadcom/compiler/nir_to_vir.c +++ b/src/broadcom/compiler/nir_to_vir.c @@ -3820,7 +3820,7 @@ is_cheap_block(nir_block *block) nir_foreach_instr(instr, block) { switch (instr->type) { case nir_instr_type_alu: - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: case nir_instr_type_load_const: if (--cost <= 0) return false; @@ -4129,7 +4129,7 @@ ntq_emit_instr(struct v3d_compile *c, nir_instr *instr) ntq_emit_load_const(c, nir_instr_as_load_const(instr)); break; - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: unreachable("Should've been lowered by nir_lower_undef_to_zero"); break; diff --git a/src/broadcom/compiler/vir.c b/src/broadcom/compiler/vir.c index c997b679514..a9c928fc101 100644 --- a/src/broadcom/compiler/vir.c +++ b/src/broadcom/compiler/vir.c @@ -1157,7 +1157,7 @@ v3d_instr_delay_cb(nir_instr *instr, void *data) struct v3d_compile *c = (struct v3d_compile *) data; switch (instr->type) { - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: case nir_instr_type_load_const: case nir_instr_type_alu: case nir_instr_type_deref: diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 4ae14bbe763..466b359c749 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -876,7 +876,7 @@ nir_undef_instr_create(nir_shader *shader, unsigned bit_size) { nir_undef_instr *instr = gc_alloc(shader->gctx, nir_undef_instr, 1); - instr_init(&instr->instr, nir_instr_type_ssa_undef); + instr_init(&instr->instr, nir_instr_type_undef); nir_def_init(&instr->instr, &instr->def, num_components, bit_size); @@ -1316,8 +1316,8 @@ nir_instr_ssa_def(nir_instr *instr) case nir_instr_type_load_const: return &nir_instr_as_load_const(instr)->def; - case nir_instr_type_ssa_undef: - return &nir_instr_as_ssa_undef(instr)->def; + case nir_instr_type_undef: + return &nir_instr_as_undef(instr)->def; case nir_instr_type_call: case nir_instr_type_jump: diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 7402d40b416..d361c529069 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -895,7 +895,7 @@ typedef enum ENUM_PACKED { nir_instr_type_intrinsic, nir_instr_type_load_const, nir_instr_type_jump, - nir_instr_type_ssa_undef, + nir_instr_type_undef, nir_instr_type_phi, nir_instr_type_parallel_copy, } nir_instr_type; @@ -1069,7 +1069,7 @@ nir_src_is_const(nir_src src) static inline bool nir_src_is_undef(nir_src src) { - return src.ssa->parent_instr->type == nir_instr_type_ssa_undef; + return src.ssa->parent_instr->type == nir_instr_type_undef; } static inline bool @@ -2518,8 +2518,8 @@ NIR_DEFINE_CAST(nir_instr_as_intrinsic, nir_instr, nir_intrinsic_instr, instr, type, nir_instr_type_intrinsic) NIR_DEFINE_CAST(nir_instr_as_load_const, nir_instr, nir_load_const_instr, instr, type, nir_instr_type_load_const) -NIR_DEFINE_CAST(nir_instr_as_ssa_undef, nir_instr, nir_undef_instr, instr, - type, nir_instr_type_ssa_undef) +NIR_DEFINE_CAST(nir_instr_as_undef, nir_instr, nir_undef_instr, instr, + type, nir_instr_type_undef) NIR_DEFINE_CAST(nir_instr_as_phi, nir_instr, nir_phi_instr, instr, type, nir_instr_type_phi) NIR_DEFINE_CAST(nir_instr_as_parallel_copy, nir_instr, @@ -2566,7 +2566,7 @@ nir_scalar_is_const(nir_scalar s) static inline bool nir_scalar_is_undef(nir_scalar s) { - return s.def->parent_instr->type == nir_instr_type_ssa_undef; + return s.def->parent_instr->type == nir_instr_type_undef; } static inline nir_const_value diff --git a/src/compiler/nir/nir_clone.c b/src/compiler/nir/nir_clone.c index 488d322ed8c..d0ac3bef584 100644 --- a/src/compiler/nir/nir_clone.c +++ b/src/compiler/nir/nir_clone.c @@ -434,8 +434,8 @@ clone_instr(clone_state *state, const nir_instr *instr) return &clone_intrinsic(state, nir_instr_as_intrinsic(instr))->instr; case nir_instr_type_load_const: return &clone_load_const(state, nir_instr_as_load_const(instr))->instr; - case nir_instr_type_ssa_undef: - return &clone_ssa_undef(state, nir_instr_as_ssa_undef(instr))->instr; + case nir_instr_type_undef: + return &clone_ssa_undef(state, nir_instr_as_undef(instr))->instr; case nir_instr_type_tex: return &clone_tex(state, nir_instr_as_tex(instr))->instr; case nir_instr_type_phi: diff --git a/src/compiler/nir/nir_divergence_analysis.c b/src/compiler/nir/nir_divergence_analysis.c index b22e2a7b67f..4e39db80ed7 100644 --- a/src/compiler/nir/nir_divergence_analysis.c +++ b/src/compiler/nir/nir_divergence_analysis.c @@ -791,8 +791,8 @@ update_instr_divergence(nir_shader *shader, nir_instr *instr) return visit_tex(nir_instr_as_tex(instr)); case nir_instr_type_load_const: return visit_load_const(nir_instr_as_load_const(instr)); - case nir_instr_type_ssa_undef: - return visit_ssa_undef(nir_instr_as_ssa_undef(instr)); + case nir_instr_type_undef: + return visit_ssa_undef(nir_instr_as_undef(instr)); case nir_instr_type_deref: return visit_deref(shader, nir_instr_as_deref(instr)); case nir_instr_type_jump: @@ -844,7 +844,7 @@ visit_if_merge_phi(nir_phi_instr *phi, bool if_cond_divergent) phi->def.divergent = true; return true; } - if (src->src.ssa->parent_instr->type != nir_instr_type_ssa_undef) { + if (src->src.ssa->parent_instr->type != nir_instr_type_undef) { defined_srcs++; } } diff --git a/src/compiler/nir/nir_from_ssa.c b/src/compiler/nir/nir_from_ssa.c index a3eaca920d5..e35f9aee19d 100644 --- a/src/compiler/nir/nir_from_ssa.c +++ b/src/compiler/nir/nir_from_ssa.c @@ -58,10 +58,10 @@ struct from_ssa_state { static bool def_after(nir_def *a, nir_def *b) { - if (a->parent_instr->type == nir_instr_type_ssa_undef) + if (a->parent_instr->type == nir_instr_type_undef) return false; - if (b->parent_instr->type == nir_instr_type_ssa_undef) + if (b->parent_instr->type == nir_instr_type_undef) return true; /* If they're in the same block, we can rely on whichever instruction @@ -79,7 +79,7 @@ def_after(nir_def *a, nir_def *b) static bool ssa_def_dominates(nir_def *a, nir_def *b) { - if (a->parent_instr->type == nir_instr_type_ssa_undef) { + if (a->parent_instr->type == nir_instr_type_undef) { /* SSA undefs always dominate */ return true; } @@ -572,7 +572,7 @@ static bool def_replace_with_reg(nir_def *def, nir_function_impl *impl) { /* These are handled elsewhere */ - assert(def->parent_instr->type != nir_instr_type_ssa_undef && + assert(def->parent_instr->type != nir_instr_type_undef && def->parent_instr->type != nir_instr_type_load_const); nir_builder b = nir_builder_create(impl); @@ -1246,9 +1246,9 @@ nir_lower_ssa_defs_to_regs_block(nir_block *block) const unsigned num_ssa = impl->ssa_alloc; nir_foreach_instr_safe(instr, block) { - if (instr->type == nir_instr_type_ssa_undef) { + if (instr->type == nir_instr_type_undef) { /* Undefs are just a read of something never written. */ - nir_undef_instr *undef = nir_instr_as_ssa_undef(instr); + nir_undef_instr *undef = nir_instr_as_undef(instr); nir_def *reg = decl_reg_for_ssa_def(&b, &undef->def); nir_rewrite_uses_to_load_reg(&b, &undef->def, reg); } else if (instr->type == nir_instr_type_load_const) { diff --git a/src/compiler/nir/nir_group_loads.c b/src/compiler/nir/nir_group_loads.c index 3d8abc70536..b6bac0c72f0 100644 --- a/src/compiler/nir/nir_group_loads.c +++ b/src/compiler/nir/nir_group_loads.c @@ -127,7 +127,7 @@ can_move(nir_instr *instr, uint8_t current_indirection_level) instr->type == nir_instr_type_deref || instr->type == nir_instr_type_tex || instr->type == nir_instr_type_load_const || - instr->type == nir_instr_type_ssa_undef) + instr->type == nir_instr_type_undef) return true; if (instr->type == nir_instr_type_intrinsic && diff --git a/src/compiler/nir/nir_inline_helpers.h b/src/compiler/nir/nir_inline_helpers.h index d05b9a7fc0d..d4f0303c439 100644 --- a/src/compiler/nir/nir_inline_helpers.h +++ b/src/compiler/nir/nir_inline_helpers.h @@ -29,8 +29,8 @@ _nir_foreach_def(nir_instr *instr, nir_foreach_def_cb cb, void *state) case nir_instr_type_load_const: return cb(&nir_instr_as_load_const(instr)->def, state); - case nir_instr_type_ssa_undef: - return cb(&nir_instr_as_ssa_undef(instr)->def, state); + case nir_instr_type_undef: + return cb(&nir_instr_as_undef(instr)->def, state); case nir_instr_type_call: case nir_instr_type_jump: @@ -133,7 +133,7 @@ nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) } case nir_instr_type_load_const: - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: return true; default: diff --git a/src/compiler/nir/nir_instr_set.c b/src/compiler/nir/nir_instr_set.c index c87992fe8df..ad0558d8be4 100644 --- a/src/compiler/nir/nir_instr_set.c +++ b/src/compiler/nir/nir_instr_set.c @@ -45,7 +45,7 @@ instr_can_rewrite(const nir_instr *instr) return nir_intrinsic_can_reorder(nir_instr_as_intrinsic(instr)); case nir_instr_type_call: case nir_instr_type_jump: - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: return false; case nir_instr_type_parallel_copy: default: @@ -703,7 +703,7 @@ nir_instrs_equal(const nir_instr *instr1, const nir_instr *instr2) } case nir_instr_type_call: case nir_instr_type_jump: - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: case nir_instr_type_parallel_copy: default: unreachable("Invalid instruction type"); diff --git a/src/compiler/nir/nir_liveness.c b/src/compiler/nir/nir_liveness.c index 2814e5313a4..53dba18d7a1 100644 --- a/src/compiler/nir/nir_liveness.c +++ b/src/compiler/nir/nir_liveness.c @@ -315,8 +315,8 @@ nir_defs_interfere(nir_def *a, nir_def *b) * least one isn't dead. */ return true; - } else if (a->parent_instr->type == nir_instr_type_ssa_undef || - b->parent_instr->type == nir_instr_type_ssa_undef) { + } else if (a->parent_instr->type == nir_instr_type_undef || + b->parent_instr->type == nir_instr_type_undef) { /* If either variable is an ssa_undef, then there's no interference */ return false; } else if (a->parent_instr->index < b->parent_instr->index) { diff --git a/src/compiler/nir/nir_lower_array_deref_of_vec.c b/src/compiler/nir/nir_lower_array_deref_of_vec.c index 161e94876c5..56f17def22d 100644 --- a/src/compiler/nir/nir_lower_array_deref_of_vec.c +++ b/src/compiler/nir/nir_lower_array_deref_of_vec.c @@ -147,7 +147,7 @@ nir_lower_array_deref_of_vec_impl(nir_function_impl *impl, nir_def *index = nir_ssa_for_src(&b, deref->arr.index, 1); nir_def *scalar = nir_vector_extract(&b, &intrin->def, index); - if (scalar->parent_instr->type == nir_instr_type_ssa_undef) { + if (scalar->parent_instr->type == nir_instr_type_undef) { nir_def_rewrite_uses(&intrin->def, scalar); nir_instr_remove(&intrin->instr); diff --git a/src/compiler/nir/nir_lower_bool_to_bitsize.c b/src/compiler/nir/nir_lower_bool_to_bitsize.c index 96fe0304c90..29fb6793e8f 100644 --- a/src/compiler/nir/nir_lower_bool_to_bitsize.c +++ b/src/compiler/nir/nir_lower_bool_to_bitsize.c @@ -395,7 +395,7 @@ nir_lower_bool_to_bitsize_instr(nir_builder *b, case nir_instr_type_phi: return lower_phi_instr(b, nir_instr_as_phi(instr)); - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: case nir_instr_type_intrinsic: { bool progress = false; nir_foreach_def(instr, rewrite_1bit_ssa_def_to_32bit, &progress); diff --git a/src/compiler/nir/nir_lower_bool_to_float.c b/src/compiler/nir/nir_lower_bool_to_float.c index a45bcc03f5d..702bc404111 100644 --- a/src/compiler/nir/nir_lower_bool_to_float.c +++ b/src/compiler/nir/nir_lower_bool_to_float.c @@ -236,7 +236,7 @@ nir_lower_bool_to_float_instr(nir_builder *b, } case nir_instr_type_intrinsic: - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: case nir_instr_type_phi: { bool progress = false; nir_foreach_def(instr, rewrite_1bit_ssa_def_to_32bit, &progress); diff --git a/src/compiler/nir/nir_lower_bool_to_int32.c b/src/compiler/nir/nir_lower_bool_to_int32.c index f7acf3dd5fe..8d4b57b6f31 100644 --- a/src/compiler/nir/nir_lower_bool_to_int32.c +++ b/src/compiler/nir/nir_lower_bool_to_int32.c @@ -196,7 +196,7 @@ nir_lower_bool_to_int32_instr(UNUSED nir_builder *b, } case nir_instr_type_intrinsic: - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: case nir_instr_type_phi: { bool progress = false; nir_foreach_def(instr, rewrite_1bit_ssa_def_to_32bit, &progress); diff --git a/src/compiler/nir/nir_lower_int_to_float.c b/src/compiler/nir/nir_lower_int_to_float.c index 906390b8e39..72fe6d8f53a 100644 --- a/src/compiler/nir/nir_lower_int_to_float.c +++ b/src/compiler/nir/nir_lower_int_to_float.c @@ -286,7 +286,7 @@ nir_lower_int_to_float_impl(nir_function_impl *impl) } case nir_instr_type_intrinsic: - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: case nir_instr_type_phi: case nir_instr_type_tex: break; diff --git a/src/compiler/nir/nir_lower_phis_to_scalar.c b/src/compiler/nir/nir_lower_phis_to_scalar.c index 41b6c25a3d7..a88a5ee24c7 100644 --- a/src/compiler/nir/nir_lower_phis_to_scalar.c +++ b/src/compiler/nir/nir_lower_phis_to_scalar.c @@ -72,7 +72,7 @@ is_phi_src_scalarizable(nir_phi_src *src, /* These are trivially scalarizable */ return true; - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: /* The caller of this function is going to OR the results and we don't * want undefs to count so we return false. */ diff --git a/src/compiler/nir/nir_lower_shader_calls.c b/src/compiler/nir/nir_lower_shader_calls.c index ca5ad40ab1a..6a15c316a2d 100644 --- a/src/compiler/nir/nir_lower_shader_calls.c +++ b/src/compiler/nir/nir_lower_shader_calls.c @@ -202,7 +202,7 @@ can_remat_instr(nir_instr *instr, struct sized_bitset *remat) } } - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: case nir_instr_type_load_const: return true; diff --git a/src/compiler/nir/nir_lower_undef_to_zero.c b/src/compiler/nir/nir_lower_undef_to_zero.c index 0cd41fc3387..d28ca037c93 100644 --- a/src/compiler/nir/nir_lower_undef_to_zero.c +++ b/src/compiler/nir/nir_lower_undef_to_zero.c @@ -43,10 +43,10 @@ static bool lower_undef_instr_to_zero(nir_builder *b, nir_instr *instr, UNUSED void *_state) { - if (instr->type != nir_instr_type_ssa_undef) + if (instr->type != nir_instr_type_undef) return false; - nir_undef_instr *und = nir_instr_as_ssa_undef(instr); + nir_undef_instr *und = nir_instr_as_undef(instr); b->cursor = nir_instr_remove(&und->instr); nir_def *zero = nir_imm_zero(b, und->def.num_components, und->def.bit_size); diff --git a/src/compiler/nir/nir_lower_vec_to_regs.c b/src/compiler/nir/nir_lower_vec_to_regs.c index 4a85121a831..b636c156aa8 100644 --- a/src/compiler/nir/nir_lower_vec_to_regs.c +++ b/src/compiler/nir/nir_lower_vec_to_regs.c @@ -45,7 +45,7 @@ insert_store(nir_builder *b, nir_def *reg, nir_alu_instr *vec, } /* No sense storing from undef, just return the write mask */ - if (src->parent_instr->type == nir_instr_type_ssa_undef) + if (src->parent_instr->type == nir_instr_type_undef) return write_mask; b->cursor = nir_before_instr(&vec->instr); diff --git a/src/compiler/nir/nir_opt_dce.c b/src/compiler/nir/nir_opt_dce.c index 80d9ce3080c..6b9935925e4 100644 --- a/src/compiler/nir/nir_opt_dce.c +++ b/src/compiler/nir/nir_opt_dce.c @@ -84,8 +84,8 @@ is_live(BITSET_WORD *defs_live, nir_instr *instr) nir_load_const_instr *lc = nir_instr_as_load_const(instr); return is_def_live(&lc->def, defs_live); } - case nir_instr_type_ssa_undef: { - nir_undef_instr *undef = nir_instr_as_ssa_undef(instr); + case nir_instr_type_undef: { + nir_undef_instr *undef = nir_instr_as_undef(instr); return is_def_live(&undef->def, defs_live); } case nir_instr_type_parallel_copy: { diff --git a/src/compiler/nir/nir_opt_gcm.c b/src/compiler/nir/nir_opt_gcm.c index 85a35acbb18..bcf227344e3 100644 --- a/src/compiler/nir/nir_opt_gcm.c +++ b/src/compiler/nir/nir_opt_gcm.c @@ -186,7 +186,7 @@ is_src_scalarizable(nir_src *src) /* These are trivially scalarizable */ return true; - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: return true; case nir_instr_type_intrinsic: { @@ -383,7 +383,7 @@ gcm_pin_instructions(nir_function_impl *impl, struct gcm_state *state) break; case nir_instr_type_jump: - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: case nir_instr_type_phi: instr->pass_flags = GCM_INSTR_PLACED; break; diff --git a/src/compiler/nir/nir_opt_if.c b/src/compiler/nir/nir_opt_if.c index 58df68f66cc..df7850d2fb8 100644 --- a/src/compiler/nir/nir_opt_if.c +++ b/src/compiler/nir/nir_opt_if.c @@ -433,7 +433,7 @@ opt_split_alu_of_phi(nir_builder *b, nir_loop *loop) nir_foreach_phi_src(src_of_phi, phi) { if (src_of_phi->pred == prev_block) { if (src_of_phi->src.ssa->parent_instr->type != - nir_instr_type_ssa_undef) { + nir_instr_type_undef) { is_prev_result_undef = false; } diff --git a/src/compiler/nir/nir_opt_move_discards_to_top.c b/src/compiler/nir/nir_opt_move_discards_to_top.c index 9fa6e33238d..cc2994b1a34 100644 --- a/src/compiler/nir/nir_opt_move_discards_to_top.c +++ b/src/compiler/nir/nir_opt_move_discards_to_top.c @@ -153,7 +153,7 @@ opt_move_discards_to_top_impl(nir_function_impl *impl) case nir_instr_type_deref: case nir_instr_type_load_const: - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: case nir_instr_type_phi: /* These are all safe */ continue; diff --git a/src/compiler/nir/nir_opt_peephole_select.c b/src/compiler/nir/nir_opt_peephole_select.c index cc6f04d9197..10b38ca12e1 100644 --- a/src/compiler/nir/nir_opt_peephole_select.c +++ b/src/compiler/nir/nir_opt_peephole_select.c @@ -70,7 +70,7 @@ block_check_for_allowed_instrs(nir_block *block, unsigned *count, case nir_instr_type_deref: case nir_instr_type_load_const: case nir_instr_type_phi: - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: case nir_instr_type_tex: break; @@ -164,7 +164,7 @@ block_check_for_allowed_instrs(nir_block *block, unsigned *count, case nir_instr_type_deref: case nir_instr_type_load_const: - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: break; case nir_instr_type_alu: { diff --git a/src/compiler/nir/nir_opt_preamble.c b/src/compiler/nir/nir_opt_preamble.c index 725acb0a9a8..8bf3f2797f1 100644 --- a/src/compiler/nir/nir_opt_preamble.c +++ b/src/compiler/nir/nir_opt_preamble.c @@ -86,7 +86,7 @@ get_instr_cost(nir_instr *instr, const nir_opt_preamble_options *options) * this for them. */ if (instr->type == nir_instr_type_load_const || - instr->type == nir_instr_type_ssa_undef) + instr->type == nir_instr_type_undef) return 0; return options->instr_cost_cb(instr, options->cb_data); @@ -252,7 +252,7 @@ can_move_instr(nir_instr *instr, opt_preamble_ctx *ctx) return can_move_intrinsic(nir_instr_as_intrinsic(instr), ctx); case nir_instr_type_load_const: - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: return true; case nir_instr_type_deref: { diff --git a/src/compiler/nir/nir_opt_shrink_vectors.c b/src/compiler/nir/nir_opt_shrink_vectors.c index b7593e04399..d0cf63f1a21 100644 --- a/src/compiler/nir/nir_opt_shrink_vectors.c +++ b/src/compiler/nir/nir_opt_shrink_vectors.c @@ -514,8 +514,8 @@ opt_shrink_vectors_instr(nir_builder *b, nir_instr *instr) case nir_instr_type_load_const: return opt_shrink_vectors_load_const(nir_instr_as_load_const(instr)); - case nir_instr_type_ssa_undef: - return opt_shrink_vectors_ssa_undef(nir_instr_as_ssa_undef(instr)); + case nir_instr_type_undef: + return opt_shrink_vectors_ssa_undef(nir_instr_as_undef(instr)); case nir_instr_type_phi: return opt_shrink_vectors_phi(b, nir_instr_as_phi(instr)); diff --git a/src/compiler/nir/nir_opt_sink.c b/src/compiler/nir/nir_opt_sink.c index da6bf4e17d8..db9a3c222e8 100644 --- a/src/compiler/nir/nir_opt_sink.c +++ b/src/compiler/nir/nir_opt_sink.c @@ -40,7 +40,7 @@ nir_can_move_instr(nir_instr *instr, nir_move_options options) { switch (instr->type) { case nir_instr_type_load_const: - case nir_instr_type_ssa_undef: { + case nir_instr_type_undef: { return options & nir_move_const_undef; } case nir_instr_type_alu: { diff --git a/src/compiler/nir/nir_opt_undef.c b/src/compiler/nir/nir_opt_undef.c index 0430ca72cc3..a77d821aff4 100644 --- a/src/compiler/nir/nir_opt_undef.c +++ b/src/compiler/nir/nir_opt_undef.c @@ -43,7 +43,7 @@ opt_undef_csel(nir_alu_instr *instr) for (int i = 1; i <= 2; i++) { nir_instr *parent = instr->src[i].src.ssa->parent_instr; - if (parent->type != nir_instr_type_ssa_undef) + if (parent->type != nir_instr_type_undef) continue; /* We can't just use nir_alu_src_copy, because we need the def/use @@ -76,7 +76,7 @@ opt_undef_vecN(nir_builder *b, nir_alu_instr *alu) return false; for (unsigned i = 0; i < nir_op_infos[alu->op].num_inputs; i++) { - if (alu->src[i].src.ssa->parent_instr->type != nir_instr_type_ssa_undef) + if (alu->src[i].src.ssa->parent_instr->type != nir_instr_type_undef) return false; } @@ -93,7 +93,7 @@ nir_get_undef_mask(nir_def *def) { nir_instr *instr = def->parent_instr; - if (instr->type == nir_instr_type_ssa_undef) + if (instr->type == nir_instr_type_undef) return BITSET_MASK(def->num_components); if (instr->type != nir_instr_type_alu) @@ -105,7 +105,7 @@ nir_get_undef_mask(nir_def *def) if (nir_op_is_vec(alu->op)) { for (int i = 0; i < nir_op_infos[alu->op].num_inputs; i++) { if (alu->src[i].src.ssa->parent_instr->type == - nir_instr_type_ssa_undef) { + nir_instr_type_undef) { undef |= BITSET_MASK(nir_ssa_alu_instr_src_components(alu, i)) << i; } } diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index 860c207cad4..494d61f5a89 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -1863,8 +1863,8 @@ print_instr(const nir_instr *instr, print_state *state, unsigned tabs) print_jump_instr(nir_instr_as_jump(instr), state); break; - case nir_instr_type_ssa_undef: - print_ssa_undef_instr(nir_instr_as_ssa_undef(instr), state); + case nir_instr_type_undef: + print_ssa_undef_instr(nir_instr_as_undef(instr), state); break; case nir_instr_type_phi: @@ -1893,7 +1893,7 @@ block_has_instruction_with_dest(nir_block *block) case nir_instr_type_deref: case nir_instr_type_alu: case nir_instr_type_tex: - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: case nir_instr_type_phi: case nir_instr_type_parallel_copy: return true; diff --git a/src/compiler/nir/nir_propagate_invariant.c b/src/compiler/nir/nir_propagate_invariant.c index 0322aad4e54..cea54e23625 100644 --- a/src/compiler/nir/nir_propagate_invariant.c +++ b/src/compiler/nir/nir_propagate_invariant.c @@ -124,7 +124,7 @@ propagate_invariant_instr(nir_instr *instr, struct set *invariants) case nir_instr_type_deref: case nir_instr_type_jump: - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: case nir_instr_type_load_const: break; /* Nothing to do */ diff --git a/src/compiler/nir/nir_schedule.c b/src/compiler/nir/nir_schedule.c index 8db3315d74c..f89ec8f3f4e 100644 --- a/src/compiler/nir/nir_schedule.c +++ b/src/compiler/nir/nir_schedule.c @@ -446,7 +446,7 @@ nir_schedule_calculate_deps(nir_deps_state *state, nir_schedule_node *n) add_read_dep(state, state->jump, n); switch (instr->type) { - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: case nir_instr_type_load_const: case nir_instr_type_alu: case nir_instr_type_deref: @@ -1075,7 +1075,7 @@ nir_schedule_get_delay(nir_schedule_scoreboard *scoreboard, nir_instr *instr) } switch (instr->type) { - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: case nir_instr_type_load_const: case nir_instr_type_alu: case nir_instr_type_deref: diff --git a/src/compiler/nir/nir_serialize.c b/src/compiler/nir/nir_serialize.c index 05aeac85677..b74b155e1f4 100644 --- a/src/compiler/nir/nir_serialize.c +++ b/src/compiler/nir/nir_serialize.c @@ -1612,8 +1612,8 @@ write_instr(write_ctx *ctx, const nir_instr *instr) case nir_instr_type_load_const: write_load_const(ctx, nir_instr_as_load_const(instr)); break; - case nir_instr_type_ssa_undef: - write_ssa_undef(ctx, nir_instr_as_ssa_undef(instr)); + case nir_instr_type_undef: + write_ssa_undef(ctx, nir_instr_as_undef(instr)); break; case nir_instr_type_tex: write_tex(ctx, nir_instr_as_tex(instr)); @@ -1658,7 +1658,7 @@ read_instr(read_ctx *ctx, nir_block *block) case nir_instr_type_load_const: instr = &read_load_const(ctx, header)->instr; break; - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: instr = &read_ssa_undef(ctx, header)->instr; break; case nir_instr_type_tex: diff --git a/src/compiler/nir/nir_to_lcssa.c b/src/compiler/nir/nir_to_lcssa.c index 6ef71f86c06..371f92a921c 100644 --- a/src/compiler/nir/nir_to_lcssa.c +++ b/src/compiler/nir/nir_to_lcssa.c @@ -168,7 +168,7 @@ instr_is_invariant(nir_instr *instr, nir_loop *loop) switch (instr->type) { case nir_instr_type_load_const: - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: return invariant; case nir_instr_type_call: return not_invariant; diff --git a/src/compiler/nir/nir_trivialize_registers.c b/src/compiler/nir/nir_trivialize_registers.c index 196eabf8046..00d2bf69bf2 100644 --- a/src/compiler/nir/nir_trivialize_registers.c +++ b/src/compiler/nir/nir_trivialize_registers.c @@ -414,7 +414,7 @@ trivialize_stores(nir_function_impl *impl, nir_block *block) /* SSA-only instruction types */ nir_instr *parent = value->parent_instr; nontrivial |= (parent->type == nir_instr_type_load_const) || - (parent->type == nir_instr_type_ssa_undef); + (parent->type == nir_instr_type_undef); /* Must be written in the same block */ nontrivial |= (parent->block != block); diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c index f2ab225616b..7ec9b28953a 100644 --- a/src/compiler/nir/nir_validate.c +++ b/src/compiler/nir/nir_validate.c @@ -1031,8 +1031,8 @@ validate_instr(nir_instr *instr, validate_state *state) validate_phi_instr(nir_instr_as_phi(instr), state); break; - case nir_instr_type_ssa_undef: - validate_ssa_undef_instr(nir_instr_as_ssa_undef(instr), state); + case nir_instr_type_undef: + validate_ssa_undef_instr(nir_instr_as_undef(instr), state); break; case nir_instr_type_jump: diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index 8220e751dad..e1e15f83e6a 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -3431,7 +3431,7 @@ read_phi_src(struct ir3_context *ctx, struct ir3_block *blk, nir_foreach_phi_src (nsrc, nphi) { if (blk->nblock == nsrc->pred) { - if (nsrc->src.ssa->parent_instr->type == nir_instr_type_ssa_undef) { + if (nsrc->src.ssa->parent_instr->type == nir_instr_type_undef) { /* Create an ir3 undef */ return NULL; } else { @@ -3503,8 +3503,8 @@ emit_instr(struct ir3_context *ctx, nir_instr *instr) case nir_instr_type_load_const: emit_load_const(ctx, nir_instr_as_load_const(instr)); break; - case nir_instr_type_ssa_undef: - emit_undef(ctx, nir_instr_as_ssa_undef(instr)); + case nir_instr_type_undef: + emit_undef(ctx, nir_instr_as_undef(instr)); break; case nir_instr_type_tex: { nir_tex_instr *tex = nir_instr_as_tex(instr); diff --git a/src/freedreno/ir3/ir3_nir_lower_64b.c b/src/freedreno/ir3/ir3_nir_lower_64b.c index 9e4dfae1b46..5b53c2a309d 100644 --- a/src/freedreno/ir3/ir3_nir_lower_64b.c +++ b/src/freedreno/ir3/ir3_nir_lower_64b.c @@ -181,7 +181,7 @@ lower_64b_undef(nir_builder *b, nir_instr *instr, void *unused) { (void)unused; - nir_undef_instr *undef = nir_instr_as_ssa_undef(instr); + nir_undef_instr *undef = nir_instr_as_undef(instr); unsigned num_comp = undef->def.num_components; nir_def *components[num_comp]; @@ -201,8 +201,8 @@ lower_64b_undef_filter(const nir_instr *instr, const void *unused) { (void)unused; - return instr->type == nir_instr_type_ssa_undef && - nir_instr_as_ssa_undef(instr)->def.bit_size == 64; + return instr->type == nir_instr_type_undef && + nir_instr_as_undef(instr)->def.bit_size == 64; } bool diff --git a/src/freedreno/ir3/ir3_nir_move_varying_inputs.c b/src/freedreno/ir3/ir3_nir_move_varying_inputs.c index b88c01d6038..e1d862d62a5 100644 --- a/src/freedreno/ir3/ir3_nir_move_varying_inputs.c +++ b/src/freedreno/ir3/ir3_nir_move_varying_inputs.c @@ -78,7 +78,7 @@ check_precondition_instr(precond_state *state, nir_instr *instr) case nir_instr_type_alu: case nir_instr_type_deref: case nir_instr_type_load_const: - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: /* These could be safely moved around */ break; case nir_instr_type_intrinsic: { diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c index 76b6cbbd6aa..d1b9cfce06d 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.c @@ -2777,8 +2777,8 @@ visit_block(struct lp_build_nir_context *bld_base, nir_block *block) case nir_instr_type_phi: assert(0); break; - case nir_instr_type_ssa_undef: - visit_ssa_undef(bld_base, nir_instr_as_ssa_undef(instr)); + case nir_instr_type_undef: + visit_ssa_undef(bld_base, nir_instr_as_undef(instr)); break; case nir_instr_type_jump: visit_jump(bld_base, nir_instr_as_jump(instr)); diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi.c b/src/gallium/auxiliary/nir/nir_to_tgsi.c index 46a02fa5736..487996342f6 100644 --- a/src/gallium/auxiliary/nir/nir_to_tgsi.c +++ b/src/gallium/auxiliary/nir/nir_to_tgsi.c @@ -1268,7 +1268,7 @@ ntt_get_alu_src(struct ntt_compile *c, nir_alu_instr *instr, int i) * the specific swizzles from an undef don't matter) */ if (nir_src_bit_size(instr->src[i].src) == 64 && - !(src.src.is_ssa && src.src.ssa->parent_instr->type == nir_instr_type_ssa_undef)) { + !(src.src.is_ssa && src.src.ssa->parent_instr->type == nir_instr_type_undef)) { int chan1 = 1; if (nir_op_infos[instr->op].input_sizes[i] == 0) { chan1 = instr->def.num_components > 1 ? 1 : 0; @@ -2941,8 +2941,8 @@ ntt_emit_instr(struct ntt_compile *c, nir_instr *instr) ntt_emit_jump(c, nir_instr_as_jump(instr)); break; - case nir_instr_type_ssa_undef: - ntt_emit_ssa_undef(c, nir_instr_as_ssa_undef(instr)); + case nir_instr_type_undef: + ntt_emit_ssa_undef(c, nir_instr_as_undef(instr)); break; default: diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c b/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c index cc1d6cfb1a3..0f51140fcb6 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c +++ b/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c @@ -399,7 +399,7 @@ get_src(struct etna_compile *c, nir_src *src) case nir_instr_type_alu: case nir_instr_type_tex: return ra_src(c, src); - case nir_instr_type_ssa_undef: { + case nir_instr_type_undef: { /* return zero to deal with broken Blur demo */ nir_const_value value = CONST(0); return src_swizzle(const_src(c, &value, 1), SWIZZLE(X,X,X,X)); @@ -634,7 +634,7 @@ emit_instr(struct etna_compile *c, nir_instr * instr) assert(nir_instr_is_last(instr)); break; case nir_instr_type_load_const: - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: case nir_instr_type_deref: break; default: diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler_nir_liveness.c b/src/gallium/drivers/etnaviv/etnaviv_compiler_nir_liveness.c index 8e532a1140c..38bbde43dd3 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_compiler_nir_liveness.c +++ b/src/gallium/drivers/etnaviv/etnaviv_compiler_nir_liveness.c @@ -79,7 +79,7 @@ set_src_live(nir_src *src, void *void_state) switch (instr->type) { case nir_instr_type_load_const: - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: return true; case nir_instr_type_alu: { /* alu op bypass */ diff --git a/src/gallium/drivers/freedreno/a2xx/ir2_nir.c b/src/gallium/drivers/freedreno/a2xx/ir2_nir.c index 1f5209c68b8..95613b4d97f 100644 --- a/src/gallium/drivers/freedreno/a2xx/ir2_nir.c +++ b/src/gallium/drivers/freedreno/a2xx/ir2_nir.c @@ -851,8 +851,8 @@ emit_instr(struct ir2_context *ctx, nir_instr *instr) case nir_instr_type_jump: ctx->block_has_jump[ctx->block_idx] = true; break; - case nir_instr_type_ssa_undef: - emit_undef(ctx, nir_instr_as_ssa_undef(instr)); + case nir_instr_type_undef: + emit_undef(ctx, nir_instr_as_undef(instr)); break; default: break; diff --git a/src/gallium/drivers/lima/ir/gp/nir.c b/src/gallium/drivers/lima/ir/gp/nir.c index f85e356d9cc..05d1124e386 100644 --- a/src/gallium/drivers/lima/ir/gp/nir.c +++ b/src/gallium/drivers/lima/ir/gp/nir.c @@ -324,7 +324,7 @@ static bool (*gpir_emit_instr[nir_instr_type_phi])(gpir_block *, nir_instr *) = [nir_instr_type_alu] = gpir_emit_alu, [nir_instr_type_intrinsic] = gpir_emit_intrinsic, [nir_instr_type_load_const] = gpir_emit_load_const, - [nir_instr_type_ssa_undef] = gpir_emit_ssa_undef, + [nir_instr_type_undef] = gpir_emit_ssa_undef, [nir_instr_type_tex] = gpir_emit_tex, [nir_instr_type_jump] = gpir_emit_jump, }; diff --git a/src/gallium/drivers/lima/ir/pp/nir.c b/src/gallium/drivers/lima/ir/pp/nir.c index 591ff4308d4..3bc129beda9 100644 --- a/src/gallium/drivers/lima/ir/pp/nir.c +++ b/src/gallium/drivers/lima/ir/pp/nir.c @@ -471,7 +471,7 @@ static bool ppir_emit_load_const(ppir_block *block, nir_instr *ni) static bool ppir_emit_ssa_undef(ppir_block *block, nir_instr *ni) { - nir_undef_instr *undef = nir_instr_as_ssa_undef(ni); + nir_undef_instr *undef = nir_instr_as_undef(ni); ppir_node *node = ppir_node_create_ssa(block, ppir_op_undef, &undef->def); if (!node) return false; @@ -665,7 +665,7 @@ static bool (*ppir_emit_instr[nir_instr_type_phi])(ppir_block *, nir_instr *) = [nir_instr_type_alu] = ppir_emit_alu, [nir_instr_type_intrinsic] = ppir_emit_intrinsic, [nir_instr_type_load_const] = ppir_emit_load_const, - [nir_instr_type_ssa_undef] = ppir_emit_ssa_undef, + [nir_instr_type_undef] = ppir_emit_ssa_undef, [nir_instr_type_tex] = ppir_emit_tex, [nir_instr_type_jump] = ppir_emit_jump, }; diff --git a/src/gallium/drivers/r600/sfn/sfn_instrfactory.cpp b/src/gallium/drivers/r600/sfn/sfn_instrfactory.cpp index 95780cf868f..1abcd86e9d3 100644 --- a/src/gallium/drivers/r600/sfn/sfn_instrfactory.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_instrfactory.cpp @@ -127,8 +127,8 @@ InstrFactory::from_nir(nir_instr *instr, Shader& shader) return TexInstr::from_nir(nir_instr_as_tex(instr), shader); case nir_instr_type_jump: return process_jump(nir_instr_as_jump(instr), shader); - case nir_instr_type_ssa_undef: - return process_undef(nir_instr_as_ssa_undef(instr), shader); + case nir_instr_type_undef: + return process_undef(nir_instr_as_undef(instr), shader); default: fprintf(stderr, "Instruction type %d not supported\n", instr->type); return false; diff --git a/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp b/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp index 86a8dada68f..cb075fe1f05 100644 --- a/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp @@ -860,8 +860,8 @@ Lower64BitToVec2::filter(const nir_instr *instr) const auto lc = nir_instr_as_load_const(instr); return lc->def.bit_size == 64; } - case nir_instr_type_ssa_undef: { - auto undef = nir_instr_as_ssa_undef(instr); + case nir_instr_type_undef: { + auto undef = nir_instr_as_undef(instr); return undef->def.bit_size == 64; } default: @@ -934,8 +934,8 @@ Lower64BitToVec2::lower(nir_instr *instr) return nir_build_imm(b, 2 * lc->def.num_components, 32, val); } - case nir_instr_type_ssa_undef: { - auto undef = nir_instr_as_ssa_undef(instr); + case nir_instr_type_undef: { + auto undef = nir_instr_as_undef(instr); undef->def.num_components *= 2; undef->def.bit_size = 32; return NIR_LOWER_INSTR_PROGRESS; diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 754130a1514..25165a19d8f 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -2008,8 +2008,8 @@ ntq_emit_instr(struct vc4_compile *c, nir_instr *instr) ntq_emit_load_const(c, nir_instr_as_load_const(instr)); break; - case nir_instr_type_ssa_undef: - ntq_emit_ssa_undef(c, nir_instr_as_ssa_undef(instr)); + case nir_instr_type_undef: + ntq_emit_ssa_undef(c, nir_instr_as_undef(instr)); break; case nir_instr_type_tex: diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c index f507e28f8af..154807fd080 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c +++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c @@ -3998,8 +3998,8 @@ emit_block(struct ntv_context *ctx, struct nir_block *block) case nir_instr_type_load_const: emit_load_const(ctx, nir_instr_as_load_const(instr)); break; - case nir_instr_type_ssa_undef: - emit_undef(ctx, nir_instr_as_ssa_undef(instr)); + case nir_instr_type_undef: + emit_undef(ctx, nir_instr_as_undef(instr)); break; case nir_instr_type_tex: emit_tex(ctx, nir_instr_as_tex(instr)); diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index c55b7339a7b..5976ab2f013 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -472,7 +472,7 @@ fs_visitor::nir_emit_instr(nir_instr *instr) nir_emit_load_const(abld, nir_instr_as_load_const(instr)); break; - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: /* We create a new VGRF for undefs on every use (by handling * them in get_nir_src()), rather than for each definition. * This helps register coalescing eliminate MOVs from undef. diff --git a/src/intel/compiler/brw_vec4_nir.cpp b/src/intel/compiler/brw_vec4_nir.cpp index 9eb81bfa05c..0c742f852c4 100644 --- a/src/intel/compiler/brw_vec4_nir.cpp +++ b/src/intel/compiler/brw_vec4_nir.cpp @@ -154,8 +154,8 @@ vec4_visitor::nir_emit_instr(nir_instr *instr) nir_emit_texture(nir_instr_as_tex(instr)); break; - case nir_instr_type_ssa_undef: - nir_emit_undef(nir_instr_as_ssa_undef(instr)); + case nir_instr_type_undef: + nir_emit_undef(nir_instr_as_undef(instr)); break; default: diff --git a/src/microsoft/compiler/nir_to_dxil.c b/src/microsoft/compiler/nir_to_dxil.c index b5c57919d6c..50e6df88357 100644 --- a/src/microsoft/compiler/nir_to_dxil.c +++ b/src/microsoft/compiler/nir_to_dxil.c @@ -5651,8 +5651,8 @@ static bool emit_instr(struct ntd_context *ctx, struct nir_instr* instr) return emit_phi(ctx, nir_instr_as_phi(instr)); case nir_instr_type_tex: return emit_tex(ctx, nir_instr_as_tex(instr)); - case nir_instr_type_ssa_undef: - return emit_undefined(ctx, nir_instr_as_ssa_undef(instr)); + case nir_instr_type_undef: + return emit_undefined(ctx, nir_instr_as_undef(instr)); default: log_nir_instr_unsupported(ctx->logger, "Unimplemented instruction type", instr); diff --git a/src/nouveau/codegen/nv50_ir_from_nir.cpp b/src/nouveau/codegen/nv50_ir_from_nir.cpp index b28f0081547..e9ccf05417b 100644 --- a/src/nouveau/codegen/nv50_ir_from_nir.cpp +++ b/src/nouveau/codegen/nv50_ir_from_nir.cpp @@ -1527,8 +1527,8 @@ Converter::visit(nir_instr *insn) return visit(nir_instr_as_jump(insn)); case nir_instr_type_load_const: return visit(nir_instr_as_load_const(insn)); - case nir_instr_type_ssa_undef: - return visit(nir_instr_as_ssa_undef(insn)); + case nir_instr_type_undef: + return visit(nir_instr_as_undef(insn)); case nir_instr_type_tex: return visit(nir_instr_as_tex(insn)); default: diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index 20add51a092..7dde6b54356 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -2299,7 +2299,7 @@ emit_instr(compiler_context *ctx, struct nir_instr *instr) emit_jump(ctx, nir_instr_as_jump(instr)); break; - case nir_instr_type_ssa_undef: + case nir_instr_type_undef: /* Spurious */ break;