diff options
author | Matt Turner <[email protected]> | 2014-04-14 11:17:13 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-04-15 09:25:44 -0700 |
commit | 18d12336b964cad54bbc0780380c3dcf625abb3d (patch) | |
tree | 97d8efebef15112c340479e61ddc7b5ae6b5a01f /src | |
parent | f34f39330bb41fb0a86930908de10353193a841d (diff) |
i965/fs: Clear variable from live-set if it's completely overwritten.
One program affected:
instructions in affected programs: 246 -> 244 (-0.81%)
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp b/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp index 390ac9ada5b..6672f840fc5 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp @@ -85,6 +85,15 @@ fs_visitor::dead_code_eliminate() } } + if (inst->dst.file == GRF) { + if (!inst->is_partial_write()) { + int var = live_intervals->var_from_vgrf[inst->dst.reg]; + for (int i = 0; i < inst->regs_written; i++) { + BITSET_CLEAR(live, var + inst->dst.reg_offset + i); + } + } + } + for (int i = 0; i < 3; i++) { if (inst->src[i].file == GRF) { int var = live_intervals->var_from_vgrf[inst->src[i].reg]; |