[Mesa-dev] [PATCH v3 0/4] A NIR constant folding infastructure

Jason Ekstrand jason at jlekstrand.net
Fri Jan 23 13:43:53 PST 2015


This is a 3rd version of the constant folding architecture that Connor came
up with based on python autogeneration.  This 3rd version has a few trivial
fixes to some of the patches and a complete rewrite of 2.  While I think
Connor's patch 2 probably worked, it involved a lot of very opaque wrapping
strings in strings and I couldn't follow it.  I've rewritten it to use mako
to generate something that is *hopefully* more clear.  I'm ok with using
Connor's version if people would prefer, but I thought I've been kicking
this around in my head and thought I'd knock it out anyway.

Connor Abbott (3):
  nir: use Python to autogenerate opcode information
  nir/constant_folding: use the new constant folding infrastructure
  nir/opt_algebraic: be more careful about constant types

Jason Ekstrand (1):
  nir: add new constant folding infrastructure

 src/glsl/Makefile.am                     |  18 +
 src/glsl/Makefile.sources                |   5 +-
 src/glsl/nir/.gitignore                  |   3 +
 src/glsl/nir/nir.h                       |  16 +-
 src/glsl/nir/nir_algebraic.py            |  39 ++-
 src/glsl/nir/nir_constant_expressions.h  |  31 ++
 src/glsl/nir/nir_constant_expressions.py | 319 +++++++++++++++++
 src/glsl/nir/nir_opcodes.c               |  46 ---
 src/glsl/nir/nir_opcodes.h               | 366 --------------------
 src/glsl/nir/nir_opcodes.py              | 575 +++++++++++++++++++++++++++++++
 src/glsl/nir/nir_opcodes_c.py            |  55 +++
 src/glsl/nir/nir_opcodes_h.py            |  47 +++
 src/glsl/nir/nir_opt_algebraic.py        |   6 +-
 src/glsl/nir/nir_opt_constant_folding.c  | 179 ++--------
 src/mesa/drivers/dri/i965/Makefile.am    |   1 +
 15 files changed, 1108 insertions(+), 598 deletions(-)
 create mode 100644 src/glsl/nir/nir_constant_expressions.h
 create mode 100644 src/glsl/nir/nir_constant_expressions.py
 delete mode 100644 src/glsl/nir/nir_opcodes.c
 delete mode 100644 src/glsl/nir/nir_opcodes.h
 create mode 100644 src/glsl/nir/nir_opcodes.py
 create mode 100644 src/glsl/nir/nir_opcodes_c.py
 create mode 100644 src/glsl/nir/nir_opcodes_h.py

-- 
2.2.1



More information about the mesa-dev mailing list