summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2017-04-20 11:44:01 -0700
committerAndres Gomez <[email protected]>2017-04-26 12:34:24 +0300
commita7c86ab750bc7e712068ac32ce83ad81c0b21bf8 (patch)
tree1fc6a7a9157b296b680ecbbc0205626846d5f1d2 /src/mesa/drivers
parent5403c029838f16c1ee7972e9e4ec9c7d9f575ee4 (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: <[email protected]> Reviewed-by: Plamena Manolova <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> (cherry picked from commit ecc19e12dca95d2571d3761dea6dec24b061013c) [Andres Gomez: resolve trivial conflicts] Signed-off-by: Andres Gomez <[email protected]> Conflicts: src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp3
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) {