From 4ae8a558b2fd5877e44d470cf5526cf5aa36c8c1 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Tue, 14 May 2024 15:58:51 +0100 Subject: [PATCH] aco: remove nir_to_aco MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This isn't used anymore Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_instruction_selection.cpp | 6 ------ src/amd/compiler/aco_instruction_selection.h | 1 - src/amd/compiler/aco_instruction_selection_setup.cpp | 4 ---- 3 files changed, 11 deletions(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index cd5fda96ff0..1dd0e144337 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -10241,9 +10241,6 @@ emit_loop_continue(isel_context* ctx) void visit_jump(isel_context* ctx, nir_jump_instr* instr) { - /* visit_block() would usually do this but divergent jumps updates ctx->block */ - ctx->cf_info.nir_to_aco[instr->instr.block->index] = ctx->block->index; - switch (instr->type) { case nir_jump_break: emit_loop_break(ctx); break; case nir_jump_continue: emit_loop_continue(ctx); break; @@ -10279,9 +10276,6 @@ visit_block(isel_context* ctx, nir_block* block) default: isel_err(instr, "Unknown NIR instr type"); } } - - if (!ctx->cf_info.parent_loop.has_divergent_branch) - ctx->cf_info.nir_to_aco[block->index] = ctx->block->index; } static bool diff --git a/src/amd/compiler/aco_instruction_selection.h b/src/amd/compiler/aco_instruction_selection.h index 11d3ec7a6ba..d5750db0fcb 100644 --- a/src/amd/compiler/aco_instruction_selection.h +++ b/src/amd/compiler/aco_instruction_selection.h @@ -65,7 +65,6 @@ struct isel_context { * and parent_if.is_divergent==false. Called _break but it's also used for * loop continues. */ bool exec_potentially_empty_break = false; - std::unique_ptr nir_to_aco; /* NIR block index to ACO block index */ } cf_info; /* NIR range analysis. */ diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp index 0ee24a9a842..37ad50ff113 100644 --- a/src/amd/compiler/aco_instruction_selection_setup.cpp +++ b/src/amd/compiler/aco_instruction_selection_setup.cpp @@ -300,8 +300,6 @@ init_context(isel_context* ctx, nir_shader* shader) ctx->program->allocateRange(impl->ssa_alloc); RegClass* regclasses = ctx->program->temp_rc.data() + ctx->first_temp_id; - std::unique_ptr nir_to_aco{new unsigned[impl->num_blocks]()}; - /* TODO: make this recursive to improve compile times */ bool done = false; while (!done) { @@ -604,8 +602,6 @@ init_context(isel_context* ctx, nir_shader* shader) ctx->program->config->spi_ps_input_ena = ctx->program->info.ps.spi_ps_input_ena; ctx->program->config->spi_ps_input_addr = ctx->program->info.ps.spi_ps_input_addr; - ctx->cf_info.nir_to_aco = std::move(nir_to_aco); - /* align and copy constant data */ while (ctx->program->constant_data.size() % 4u) ctx->program->constant_data.push_back(0);