diff options
author | Eric Anholt <[email protected]> | 2010-10-10 12:13:35 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-10-11 11:52:01 -0700 |
commit | 251fe2785484f7ba0c194c92fe0feff9c78b52ca (patch) | |
tree | 6dba04fa643ac3e5a3b195881ee11c8dbf205f29 | |
parent | 90c402204018c78f4a0b8a79515cf8c582092963 (diff) |
i965: Reduce register interference checks for changed FS_OPCODE_DISCARD.
While I don't know of any performance changes from this (once extra
reg available out of 128), it makes the generated asm a lot cleaner
looking.
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index f41e8783e67..798c36971f3 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2706,10 +2706,7 @@ fs_visitor::dead_code_eliminate() bool dead[num_vars]; for (int i = 0; i < num_vars; i++) { - /* This would be ">=", but FS_OPCODE_DISCARD has a src == dst where - * it writes dst then reads it as src. - */ - dead[i] = this->virtual_grf_def[i] > this->virtual_grf_use[i]; + dead[i] = this->virtual_grf_def[i] >= this->virtual_grf_use[i]; if (dead[i]) { /* Mark off its interval so it won't interfere with anything. */ @@ -2824,7 +2821,7 @@ fs_visitor::virtual_grf_interferes(int a, int b) this->virtual_grf_def[b] < this->virtual_grf_use[a]); } - return start <= end; + return start < end; } static struct brw_reg brw_reg_from_fs_reg(fs_reg *reg) |