aco/live_var_analysis: use separate allocator for temporary live sets
This drastically reduces the memory footprint of the live sets. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29962>
This commit is contained in:
committed by
Marge Bot
parent
7c466157d0
commit
ad01e473f5
@@ -68,6 +68,7 @@ get_temp_registers(aco_ptr<Instruction>& 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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user