diff options
author | Kenneth Graunke <[email protected]> | 2013-08-09 17:50:03 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-08-19 11:29:23 -0700 |
commit | 0225dea6c49674a27d5be6e933447d8a4ba5a82e (patch) | |
tree | ea1d069b990fa0076b6f29687e13023e84ba9e11 /src | |
parent | 3c68662bb1d41727b6c53fd58868cdcfe6a98492 (diff) |
i965/fs: Switch to a do-while loop in copy propagation dataflow.
The fixed-point algorithm needs to run at least once, so a do-while loop
is more natural.
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.cpp | 6 |
1 files changed, 3 insertions, 3 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 ddf21df5d28..663b61f3859 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp @@ -162,9 +162,9 @@ fs_copy_prop_dataflow::setup_kills() void fs_copy_prop_dataflow::run() { - bool cont = true; + bool cont; - while (cont) { + do { cont = false; for (int b = 0; b < cfg->num_blocks; b++) { @@ -194,7 +194,7 @@ fs_copy_prop_dataflow::run() } } } - } + } while (cont); } bool |