diff options
author | Francisco Jerez <currojerez@riseup.net> | 2017-04-20 11:44:01 -0700 |
---|---|---|
committer | Andres Gomez <agomez@igalia.com> | 2017-04-26 12:34:24 +0300 |
commit | a7c86ab750bc7e712068ac32ce83ad81c0b21bf8 (patch) | |
tree | 1fc6a7a9157b296b680ecbbc0205626846d5f1d2 /src | |
parent | 5403c029838f16c1ee7972e9e4ec9c7d9f575ee4 (diff) |
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>
(cherry picked from commit ecc19e12dca95d2571d3761dea6dec24b061013c)
[Andres Gomez: resolve trivial conflicts]
Signed-off-by: Andres Gomez <agomez@igalia.com>
Conflicts:
src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp index 5c6f3d490f0..6ede65a1f59 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp @@ -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) - * loop_scale; + spill_costs[inst->dst.nr] += regs_written(inst) * loop_scale; switch (inst->opcode) { |