From 39fc327b8fdcdf79ddd51eed7fa5eaa63d491b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Wed, 2 Oct 2024 15:51:16 +0200 Subject: [PATCH] aco/reindex_ssa: remove update_live_out parameter Part-of: --- src/amd/compiler/aco_ir.h | 2 +- src/amd/compiler/aco_lower_to_cssa.cpp | 2 +- src/amd/compiler/aco_reindex_ssa.cpp | 17 ++++++++--------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/amd/compiler/aco_ir.h b/src/amd/compiler/aco_ir.h index 273d58c6918..5794dad7b88 100644 --- a/src/amd/compiler/aco_ir.h +++ b/src/amd/compiler/aco_ir.h @@ -2133,7 +2133,7 @@ public: uint32_t peekAllocationId() { return allocationID; } - friend void reindex_ssa(Program* program, bool update_live_out); + friend void reindex_ssa(Program* program); Block* create_and_insert_block() { diff --git a/src/amd/compiler/aco_lower_to_cssa.cpp b/src/amd/compiler/aco_lower_to_cssa.cpp index 4a9b71fa689..4268e21d820 100644 --- a/src/amd/compiler/aco_lower_to_cssa.cpp +++ b/src/amd/compiler/aco_lower_to_cssa.cpp @@ -554,7 +554,7 @@ emit_parallelcopies(cssa_ctx& ctx) void lower_to_cssa(Program* program) { - reindex_ssa(program, true); + reindex_ssa(program); cssa_ctx ctx = {program}; collect_parallelcopies(ctx); emit_parallelcopies(ctx); diff --git a/src/amd/compiler/aco_reindex_ssa.cpp b/src/amd/compiler/aco_reindex_ssa.cpp index 0da38057423..bec41e2e200 100644 --- a/src/amd/compiler/aco_reindex_ssa.cpp +++ b/src/amd/compiler/aco_reindex_ssa.cpp @@ -79,18 +79,17 @@ reindex_program(idx_ctx& ctx, Program* program) } /* end namespace */ void -reindex_ssa(Program* program, bool update_live_out = false) +reindex_ssa(Program* program) { idx_ctx ctx; reindex_program(ctx, program); - if (update_live_out) { - monotonic_buffer_resource old_memory = std::move(program->live.memory); - for (IDSet& set : program->live.live_in) { - IDSet new_set(program->live.memory); - for (uint32_t id : set) - new_set.insert(ctx.renames[id]); - set = std::move(new_set); - } + + monotonic_buffer_resource old_memory = std::move(program->live.memory); + for (IDSet& set : program->live.live_in) { + IDSet new_set(program->live.memory); + for (uint32_t id : set) + new_set.insert(ctx.renames[id]); + set = std::move(new_set); } program->allocationID = program->temp_rc.size();