Module: Mesa
Branch: main
Commit: d1bddfba6b6951fccf95fad9795c2e242f26129f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d1bddfba6b6951fccf95fad9795c2e242f26129f

Author: Jason Ekstrand <[email protected]>
Date:   Mon Sep 28 09:11:39 2020 -0500

intel/nir: Add optimizations to help OpenCL-style kernels

Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>

---

 src/intel/compiler/brw_nir.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c
index 42e628edd11..e764041b623 100644
--- a/src/intel/compiler/brw_nir.c
+++ b/src/intel/compiler/brw_nir.c
@@ -536,6 +536,8 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler 
*compiler,
       OPT(nir_split_array_vars, nir_var_function_temp);
       OPT(nir_shrink_vec_array_vars, nir_var_function_temp);
       OPT(nir_opt_deref);
+      if (OPT(nir_opt_memcpy))
+         OPT(nir_split_var_copies);
       OPT(nir_lower_vars_to_ssa);
       if (allow_copies) {
          /* Only run this pass in the first call to brw_nir_optimize.  Later
@@ -595,6 +597,7 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler 
*compiler,
       OPT(nir_opt_intrinsics);
       OPT(nir_opt_idiv_const, 32);
       OPT(nir_opt_algebraic);
+      OPT(nir_lower_constant_convert_alu_types);
       OPT(nir_opt_constant_folding);
 
       if (lower_flrp != 0) {

Reply via email to