[Mesa-dev] [PATCH v2 0/7] NIR CSE hashing

Connor Abbott cwabbott0 at gmail.com
Wed Sep 30 08:11:55 PDT 2015


This is a v2 of my series to make the NIR CSE pass use a hash table
internally. The big difference from the last revision is that the
entire implementation is in one file, nir_instr_set.c, with one public
API (nir_instrs_equal() isn't publically exposed anymore), rather than
being split across two files. This keeps the three different functions
that need to be in sync together. I opted not to make
nir_instrs_equal() and instr_hash() support everything (but silently
fall back on some things) since that would unnecessarily add
un-rewritable instructions to the hash table and increase the chance
that one would handle less than the other without us noticing.

The main missing thing is updated performance numbers from compiling
shader-db, but I don't expect that they'll be too different.

The series is also available at

git://people.freedesktop.org/~cwabbott0/mesa nir-cse-hash-v2

Connor Abbott (7):
  nir: split out instruction comparison functions
  nir: constify nir_ssa_alu_instr_src_components()
  nir: constify instruction comparison functions
  nir: add an instruction set API
  nir/cse: use the instruction set API
  nir: make nir_instrs_equal() static
  nir/instr_set: remove unnecessary check in nir_instrs_equal()

 src/glsl/Makefile.sources    |   1 +
 src/glsl/nir/nir.c           |  26 ---
 src/glsl/nir/nir.h           |   2 +-
 src/glsl/nir/nir_instr_set.c | 516 +++++++++++++++++++++++++++++++++++++++++++
 src/glsl/nir/nir_instr_set.h |  62 ++++++
 src/glsl/nir/nir_opt_cse.c   | 293 ++----------------------
 6 files changed, 604 insertions(+), 296 deletions(-)
 create mode 100644 src/glsl/nir/nir_instr_set.c
 create mode 100644 src/glsl/nir/nir_instr_set.h

-- 
2.1.0



More information about the mesa-dev mailing list