summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-08-09 18:27:22 -0700
committerKenneth Graunke <[email protected]>2013-08-19 11:29:24 -0700
commita291c59bbae7d9d96487a984f81a298a1fd71389 (patch)
treee11033e4f77cd3554ea174f73d8fbda636fcaf35 /src
parent597efd2b67d1afb8a95be38145c4f977ed36b672 (diff)
i965/fs: Simplify liveout calculation.
Excluding the existing liveout bits is a deviation from the textbook algorithm. The reason for doing so was to determine if the value changed, which means the fixed-point algorithm needs to run for another iteration. The simpler way to do that is to save the value from step (N-1) and compare it to the new value at step N. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
index 424d7b52dcc..0078c871c5d 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
@@ -186,13 +186,12 @@ fs_copy_prop_dataflow::run()
/* Update liveout for all blocks. */
for (int b = 0; b < cfg->num_blocks; b++) {
for (int i = 0; i < bitset_words; i++) {
- BITSET_WORD new_liveout = (bd[b].livein[i] &
- ~bd[b].kill[i] &
- ~bd[b].liveout[i]);
- if (new_liveout) {
- bd[b].liveout[i] |= new_liveout;
+ const BITSET_WORD old_liveout = bd[b].liveout[i];
+
+ bd[b].liveout[i] |= bd[b].livein[i] & ~bd[b].kill[i];
+
+ if (old_liveout != bd[b].liveout[i])
progress = true;
- }
}
}