diff --git a/src/compiler/clc/nir_lower_libclc.c b/src/compiler/clc/nir_lower_libclc.c index d6d9696bf45..232e886e28f 100644 --- a/src/compiler/clc/nir_lower_libclc.c +++ b/src/compiler/clc/nir_lower_libclc.c @@ -85,7 +85,6 @@ nir_lower_libclc_impl(nir_function_impl *impl, if (progress) { nir_index_ssa_defs(impl); - nir_index_local_regs(impl); nir_metadata_preserve(impl, nir_metadata_none); } else { nir_metadata_preserve(impl, nir_metadata_all); diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index b09e544be13..573d8dfd7c1 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -220,30 +220,6 @@ nir_shader_create(void *mem_ctx, return shader; } -static nir_register * -reg_create(void *mem_ctx, struct exec_list *list) -{ - nir_register *reg = ralloc(mem_ctx, nir_register); - - list_inithead(®->uses); - list_inithead(®->defs); - - reg->num_components = 0; - reg->bit_size = 32; - reg->num_array_elems = 0; - reg->divergent = false; - - exec_list_push_tail(list, ®->node); - - return reg; -} - -void -nir_reg_remove(nir_register *reg) -{ - exec_node_remove(®->node); -} - void nir_shader_add_variable(nir_shader *shader, nir_variable *var) { @@ -1381,16 +1357,6 @@ nir_instr_free_and_dce(nir_instr *instr) /*@}*/ -void -nir_index_local_regs(nir_function_impl *impl) -{ - unsigned index = 0; - foreach_list_typed(nir_register, reg, node, &impl->registers) { - reg->index = index++; - } - impl->reg_alloc = index; -} - struct foreach_ssa_def_state { nir_foreach_ssa_def_cb cb; void *client_state; diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index ed0ccf70ad9..4db5bad579f 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -4127,8 +4127,6 @@ nir_shader *nir_shader_create(void *mem_ctx, const nir_shader_compiler_options *options, shader_info *si); -void nir_reg_remove(nir_register *reg); - /** Adds a variable to the appropriate list in nir_shader */ void nir_shader_add_variable(nir_shader *shader, nir_variable *var); @@ -4674,7 +4672,6 @@ nir_loop *nir_block_get_following_loop(nir_block *block); nir_block **nir_block_get_predecessors_sorted(const nir_block *block, void *mem_ctx); -void nir_index_local_regs(nir_function_impl *impl); void nir_index_ssa_defs(nir_function_impl *impl); unsigned nir_index_instrs(nir_function_impl *impl); diff --git a/src/compiler/nir/nir_inline_functions.c b/src/compiler/nir/nir_inline_functions.c index c84400caab3..f46a3096608 100644 --- a/src/compiler/nir/nir_inline_functions.c +++ b/src/compiler/nir/nir_inline_functions.c @@ -185,9 +185,8 @@ inline_function_impl(nir_function_impl *impl, struct set *inlined) } if (progress) { - /* SSA and register indices are completely messed up now */ + /* Indices are completely messed up now */ nir_index_ssa_defs(impl); - nir_index_local_regs(impl); nir_metadata_preserve(impl, nir_metadata_none); } else { diff --git a/src/compiler/nir/nir_lower_double_ops.c b/src/compiler/nir/nir_lower_double_ops.c index 0caaf9bb6b9..1d106ddf414 100644 --- a/src/compiler/nir/nir_lower_double_ops.c +++ b/src/compiler/nir/nir_lower_double_ops.c @@ -764,9 +764,8 @@ nir_lower_doubles_impl(nir_function_impl *impl, &data); if (progress && (options & nir_lower_fp64_full_software)) { - /* SSA and register indices are completely messed up now */ + /* Indices are completely messed up now */ nir_index_ssa_defs(impl); - nir_index_local_regs(impl); nir_metadata_preserve(impl, nir_metadata_none);