mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
aco: compute live-in variables in addition to live-out variables
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30120>
This commit is contained in:
parent
9a4a03ec1f
commit
29262f8cf3
2 changed files with 9 additions and 0 deletions
|
|
@ -2066,6 +2066,8 @@ public:
|
|||
monotonic_buffer_resource memory;
|
||||
/* live temps out per block */
|
||||
std::vector<IDSet> live_out;
|
||||
/* live-in temps per block */
|
||||
std::vector<IDSet> live_in;
|
||||
} live;
|
||||
|
||||
struct {
|
||||
|
|
|
|||
|
|
@ -246,6 +246,11 @@ process_live_temps_per_block(live_ctx& ctx, Block* block)
|
|||
}
|
||||
}
|
||||
|
||||
if (ctx.program->live.live_in[block->index].insert(live)) {
|
||||
if (block->linear_preds.size())
|
||||
ctx.worklist = std::max<int>(ctx.worklist, block->linear_preds.back());
|
||||
}
|
||||
|
||||
block->live_in_demand = new_demand;
|
||||
block->live_in_demand.sgpr += 2; /* Add 2 SGPRs for potential long-jumps. */
|
||||
block->register_demand.update(block->live_in_demand);
|
||||
|
|
@ -417,8 +422,10 @@ void
|
|||
live_var_analysis(Program* program)
|
||||
{
|
||||
program->live.live_out.clear();
|
||||
program->live.live_in.clear();
|
||||
program->live.memory.release();
|
||||
program->live.live_out.resize(program->blocks.size(), IDSet(program->live.memory));
|
||||
program->live.live_in.resize(program->blocks.size(), IDSet(program->live.memory));
|
||||
program->max_reg_demand = RegisterDemand();
|
||||
program->needs_vcc = program->gfx_level >= GFX10;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue