[Mesa-dev] [PATCH 1/2] intel/fs: Use regs_written() in spilling cost heuristic for improved accuracy.
Francisco Jerez
currojerez at riseup.net
Fri Apr 21 18:49:37 UTC 2017
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 at lists.freedesktop.org>
---
src/intel/compiler/brw_fs_reg_allocate.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/intel/compiler/brw_fs_reg_allocate.cpp b/src/intel/compiler/brw_fs_reg_allocate.cpp
index c981d72..2d4d46e 100644
--- a/src/intel/compiler/brw_fs_reg_allocate.cpp
+++ b/src/intel/compiler/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)
- * block_scale;
+ spill_costs[inst->dst.nr] += regs_written(inst) * block_scale;
switch (inst->opcode) {
--
2.10.2
More information about the mesa-dev
mailing list