This is the second version of my optimization series for variables. The first version, including the very descriptive cover letter can be found here:
https://patchwork.freedesktop.org/series/47295/ This second version contains changes to the array splitting and vector narrowing passes. The array splitting pass is just cleaned up a bit to be more understandable and match the other passes better. The vector narrowing pass is renamed to nir_shrink_vec_array_vars and is improved to also be able to shrink over-sized arrays. This series can be found on my gitlab here: https://gitlab.freedesktop.org/jekstrand/mesa/commits/wip/nir-var-opts Cc: Timothy Arceri <tarc...@itsqueeze.com> Cc: Caio Marcelo de Oliveira Filho <caio.olive...@intel.com> Jason Ekstrand (11): util/list: Make some helpers take const lists nir: Take if uses into account in ssa_def_components_read nir/instr_set: Fix nir_instrs_equal for derefs nir/types: Add array_or_matrix helpers nir: Add a structure splitting pass nir: Add an array splitting pass intel/nir: Use the new structure and array splitting passes nir: Add a array-of-vector variable shrinking pass intel/nir: Use nir_shrink_vec_array_vars nir: Add an array copy optimization intel/nir: Enable nir_opt_find_array_copies src/compiler/Makefile.sources | 2 + src/compiler/nir/meson.build | 2 + src/compiler/nir/nir.c | 3 + src/compiler/nir/nir.h | 5 + src/compiler/nir/nir_instr_set.c | 4 +- src/compiler/nir/nir_opt_find_array_copies.c | 383 +++++ src/compiler/nir/nir_split_vars.c | 1548 ++++++++++++++++++ src/compiler/nir_types.cpp | 15 + src/compiler/nir_types.h | 2 + src/intel/compiler/brw_nir.c | 19 +- src/intel/compiler/brw_nir.h | 3 +- src/util/list.h | 8 +- 12 files changed, 1980 insertions(+), 14 deletions(-) create mode 100644 src/compiler/nir/nir_opt_find_array_copies.c create mode 100644 src/compiler/nir/nir_split_vars.c -- 2.17.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev