[Mesa-dev] [PATCH v2 12/12] i965/nir: Use Global Code Motion

Jason Ekstrand jason at jlekstrand.net
Mon Feb 9 00:19:15 PST 2015


v2: Do GCM after dead code elimination
---
 src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index da81b61..a0e6b1d 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -44,6 +44,8 @@ nir_optimize(nir_shader *nir)
       nir_validate_shader(nir);
       progress |= nir_opt_dce(nir);
       nir_validate_shader(nir);
+      nir_opt_gcm(nir);
+      nir_validate_shader(nir);
       progress |= nir_opt_cse(nir);
       nir_validate_shader(nir);
       progress |= nir_opt_peephole_select(nir);
-- 
2.2.2



More information about the mesa-dev mailing list