diff options
author | Eric Anholt <[email protected]> | 2013-04-30 15:00:40 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-05-09 14:38:05 -0700 |
commit | e290372542d0475e612e4d10a27b22eae3158ecd (patch) | |
tree | ad199a00e38af2fa46c665283856e3659e64845e /src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | |
parent | dd6152b6cacb869d6db028656927ea2af168448d (diff) |
i965/fs: Make virtual grf live intervals actually cover their used range.
Previously, we would sometimes not consider a write to a register to
extend the end of the interval, nor would we consider a read before a
write to extend the start. This made for a bunch of complicated logic
related to how to treat the results when dead code might be present.
Instead, just extend the interval and fix dead code elimination to know
how to remove it.
Interestingly, this actually results in a tiny bit more optimization:
total instructions in shared programs: 1391220 -> 1390799 (-0.03%)
instructions in affected programs: 14037 -> 13616 (-3.00%)
v2: Fix a theoretical problem with the simd16 workaround if dst == src,
where we would revert the bump of the live range.
Reviewed-by: Ian Romanick <[email protected]> (v1)
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp')
-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 fa1a93820d2..acd98466860 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp @@ -316,8 +316,7 @@ fs_visitor::setup_payload_interference(struct ra_graph *g, * in order to not have to worry about the uniform issue described in * calculate_live_intervals(). */ - if (this->virtual_grf_def[j] <= payload_last_use_ip[i] || - this->virtual_grf_use[j] <= payload_last_use_ip[i]) { + if (this->virtual_grf_start[j] <= payload_last_use_ip[i]) { ra_add_node_interference(g, first_payload_node + i, j); } } |