mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-28 04:20:40 +02:00
aco/ra: use live_in_demand in should_compact_linear_vgprs()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29962>
This commit is contained in:
parent
4e2a0a5ad0
commit
dc851c0aa6
1 changed files with 2 additions and 7 deletions
|
|
@ -1704,13 +1704,8 @@ should_compact_linear_vgprs(ra_ctx& ctx, const RegisterFile& reg_file)
|
|||
max_vgpr_usage =
|
||||
MAX2(max_vgpr_usage, (unsigned)ctx.program->blocks[next_toplevel].register_demand.vgpr);
|
||||
}
|
||||
|
||||
std::vector<aco_ptr<Instruction>>& instructions =
|
||||
ctx.program->blocks[next_toplevel].instructions;
|
||||
if (!instructions.empty() && is_phi(instructions[0])) {
|
||||
max_vgpr_usage =
|
||||
MAX2(max_vgpr_usage, (unsigned)ctx.program->live.register_demand[next_toplevel][0].vgpr);
|
||||
}
|
||||
max_vgpr_usage =
|
||||
MAX2(max_vgpr_usage, (unsigned)ctx.program->blocks[next_toplevel].live_in_demand.vgpr);
|
||||
|
||||
for (unsigned tmp : find_vars(ctx, reg_file, get_reg_bounds(ctx, RegType::vgpr, true)))
|
||||
max_vgpr_usage -= ctx.assignments[tmp].rc.size();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue