mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 13:30:12 +01:00
intel/fs: Use regs_written() in spilling cost heuristic for improved accuracy.
This is what we use later on to compute the number of registers that will actually get spilled to memory, so it's more likely to match reality than the current open-coded approximation. Cc: <mesa-stable@lists.freedesktop.org> Reviewed-by: Plamena Manolova <plamena.manolova@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
6b10c37b9c
commit
ecc19e12dc
1 changed files with 1 additions and 2 deletions
|
|
@ -826,8 +826,7 @@ fs_visitor::choose_spill_reg(struct ra_graph *g)
|
|||
}
|
||||
|
||||
if (inst->dst.file == VGRF)
|
||||
spill_costs[inst->dst.nr] += DIV_ROUND_UP(inst->size_written, REG_SIZE)
|
||||
* block_scale;
|
||||
spill_costs[inst->dst.nr] += regs_written(inst) * block_scale;
|
||||
|
||||
switch (inst->opcode) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue