[Mesa-dev] [PATCH 9/9] i965/fs/nir: enable the dead control flow optimization

Connor Abbott cwabbott0 at gmail.com
Fri May 8 22:03:35 PDT 2015


Doesn't do anything on the public shader-db.

Signed-off-by: Connor Abbott <cwabbott0 at gmail.com>
---
 src/glsl/Makefile.sources           | 1 +
 src/mesa/drivers/dri/i965/brw_nir.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/glsl/Makefile.sources b/src/glsl/Makefile.sources
index d784a81..7bdd895 100644
--- a/src/glsl/Makefile.sources
+++ b/src/glsl/Makefile.sources
@@ -50,6 +50,7 @@ NIR_FILES = \
 	nir/nir_opt_copy_propagate.c \
 	nir/nir_opt_cse.c \
 	nir/nir_opt_dce.c \
+	nir/nir_opt_dead_cf.c \
 	nir/nir_opt_gcm.c \
 	nir/nir_opt_global_to_local.c \
 	nir/nir_opt_peephole_ffma.c \
diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c
index de4d7aa..4001190 100644
--- a/src/mesa/drivers/dri/i965/brw_nir.c
+++ b/src/mesa/drivers/dri/i965/brw_nir.c
@@ -52,6 +52,8 @@ nir_optimize(nir_shader *nir)
       nir_validate_shader(nir);
       progress |= nir_opt_constant_folding(nir);
       nir_validate_shader(nir);
+      progress |= nir_opt_dead_cf(nir);
+      nir_validate_shader(nir);
       progress |= nir_opt_remove_phis(nir);
       nir_validate_shader(nir);
    } while (progress);
-- 
2.1.0



More information about the mesa-dev mailing list