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

Jason Ekstrand jason at jlekstrand.net
Wed Sep 30 09:38:55 PDT 2015


On Wed, Sep 30, 2015 at 8:11 AM, Connor Abbott <cwabbott0 at gmail.com> wrote:
> 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.

If you can get them reasonably, that'd be cool.  Otherwise, I'm 100%
ok with using the old numbers.  You're right that they shouldn't be
substantially different.  Might be good to say that they're from the
v1 though.

> 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

The first three are

Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>

>   nir: add an instruction set API

I had some minor comments here.

>   nir/cse: use the instruction set API
>   nir: make nir_instrs_equal() static
>   nir/instr_set: remove unnecessary check in nir_instrs_equal()

The last three are also

Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>

>  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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list