[Mesa-dev] [PATCH 06/12] nir: don't count removal of lcssa_phi as progress
Timothy Arceri
timothy.arceri at collabora.com
Sat Aug 27 06:03:28 UTC 2016
We generate these in each optimisation pass, counting them
as progress would cause the loop to run forever.
---
src/compiler/nir/nir_opt_remove_phis.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/compiler/nir/nir_opt_remove_phis.c b/src/compiler/nir/nir_opt_remove_phis.c
index ee92fbe..13a139d 100644
--- a/src/compiler/nir/nir_opt_remove_phis.c
+++ b/src/compiler/nir/nir_opt_remove_phis.c
@@ -72,6 +72,7 @@ remove_phis_block(nir_block *block)
break;
nir_phi_instr *phi = nir_instr_as_phi(instr);
+ bool is_lcssa_phi = phi->is_lcssa_phi;
nir_ssa_def *def = NULL;
nir_alu_instr *mov = NULL;
@@ -118,6 +119,8 @@ remove_phis_block(nir_block *block)
nir_instr_remove(instr);
progress = true;
+ if (!is_lcssa_phi)
+ progress = true;
}
return progress;
--
2.7.4
More information about the mesa-dev
mailing list