diff --git a/src/amd/compiler/aco_live_var_analysis.cpp b/src/amd/compiler/aco_live_var_analysis.cpp index f17a6e4e4c2..52a48d1e314 100644 --- a/src/amd/compiler/aco_live_var_analysis.cpp +++ b/src/amd/compiler/aco_live_var_analysis.cpp @@ -68,6 +68,7 @@ get_temp_registers(aco_ptr& instr) namespace { struct live_ctx { + monotonic_buffer_resource m; Program* program; int worklist; }; @@ -92,7 +93,7 @@ process_live_temps_per_block(live_ctx& ctx, Block* block) { RegisterDemand new_demand; block->register_demand = RegisterDemand(); - IDSet live = ctx.program->live.live_out[block->index]; + IDSet live(ctx.program->live.live_out[block->index], ctx.m); /* initialize register demand */ for (unsigned t : live) diff --git a/src/amd/compiler/aco_util.h b/src/amd/compiler/aco_util.h index 8bf55977d20..3bc3050d9d3 100644 --- a/src/amd/compiler/aco_util.h +++ b/src/amd/compiler/aco_util.h @@ -514,6 +514,7 @@ struct IDSet { bool empty() const { return !size(); } explicit IDSet(monotonic_buffer_resource& m) : words(m) {} + explicit IDSet(const IDSet& other, monotonic_buffer_resource& m) : words(other.words, m) {} private: static uint32_t get_first_set(const block_t& words)