From 0225dea6c49674a27d5be6e933447d8a4ba5a82e Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 9 Aug 2013 17:50:03 -0700 Subject: [PATCH] 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 Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 6 +++--- 1 file 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 -- 2.30.2