[Mesa-dev] [PATCH 00/23] Remove the hash table in mesa/program

Thomas Helland thomashelland90 at gmail.com
Tue Aug 16 20:10:13 UTC 2016


This patch series is inspired by Eric's latest work.
This should allow us to get rid of the hash table completely.
It has been compile tested to ensure every commit compiles,
but not it has not seen a piglit run yet.
I have ran shader-db at sporadic intervals to ensure things work,
and that the instruction count stays the same, as a safety measure.
There are some compiler warnings appearing midways in this series.,
however these are all gone when we reach to final goal of removing
the hash table all together at the last commit.
I'm quite happy with how the series turned out, and I believe it
should be quite easy to review.

It would be favorable if the whole series lands in master
at the same time, to avoid multiple recompiles of the whole
world for everyone, as the changes are quite invasive.

Thomas Helland (23):
  mesa: Remove unused hash table includes
  mesa: Replace hashing and compare functions of prog_hash_table
  mesa: Remove prog_hash_table.c
  util: Move hash_table_call_foreach to util hash table
  mesa: Convert string_to_uint_map to the util hash table
  glsl: Convert function inlining to the util hash table
  glsl: Convert ir_clone to the util hash table
  glsl: Convert ast_to_hir to the util hash table
  glsl: Convert ir_constant_expression to the util hash table
  glsl: Convert recursion detection to the util hash table
  glsl: Convert link_functions to the util hash table
  glsl: Change link_functions to use a set
  glsl: Convert link_varyings to the util hash table
  glsl: Convert linker to the util hash table
  glsl: Convert if lowering to use the util hash table
  glsl: Convert if lowering to use a set
  glsl: Convert interface block lowering to the util hash table
  glsl: Convert output read lowering to the util hash table
  glsl: Convert varying test to the util hash table
  mesa: Convert symbol table to the util hash table
  glsl: Convert loop analysis to the util hash table
  glsl: Convert glcpp-parse to the util hash table
  mesa/glsl: Move string_to_uint_map into the util folder

 src/Makefile.am                                    |   1 -
 src/compiler/SConscript.glsl                       |   2 -
 src/compiler/glsl/ast_to_hir.cpp                   |  26 +-
 src/compiler/glsl/glcpp/glcpp-parse.y              |  54 ++--
 src/compiler/glsl/glcpp/glcpp.h                    |   2 +-
 src/compiler/glsl/ir_clone.cpp                     |  31 +-
 src/compiler/glsl/ir_constant_expression.cpp       |  24 +-
 src/compiler/glsl/ir_function_detect_recursion.cpp |  30 +-
 src/compiler/glsl/link_atomics.cpp                 |   1 -
 src/compiler/glsl/link_functions.cpp               |  28 +-
 src/compiler/glsl/link_uniform_initializers.cpp    |   2 +-
 src/compiler/glsl/link_uniforms.cpp                |   3 +-
 src/compiler/glsl/link_varyings.cpp                |  58 ++--
 src/compiler/glsl/linker.cpp                       |  31 +-
 src/compiler/glsl/loop_analysis.cpp                |  25 +-
 src/compiler/glsl/loop_analysis.h                  |   8 +-
 src/compiler/glsl/lower_discard_flow.cpp           |   1 -
 src/compiler/glsl/lower_if_to_cond_assign.cpp      |  49 +--
 src/compiler/glsl/lower_named_interface_blocks.cpp |  27 +-
 src/compiler/glsl/lower_output_reads.cpp           |  17 +-
 src/compiler/glsl/opt_function_inlining.cpp        |   6 +-
 src/compiler/glsl/standalone.cpp                   |   2 +-
 .../glsl/tests/set_uniform_initializer_tests.cpp   |   2 +-
 src/compiler/glsl/tests/varyings_test.cpp          |  73 ++---
 src/mesa/Android.libmesa_glsl_utils.mk             |   2 -
 src/mesa/Makefile.sources                          |   3 -
 src/mesa/main/shader_query.cpp                     |   2 +-
 src/mesa/main/shaderobj.c                          |   2 +-
 src/mesa/main/uniform_query.cpp                    |   1 -
 src/mesa/program/hash_table.h                      | 352 ---------------------
 src/mesa/program/ir_to_mesa.cpp                    |   2 +-
 src/mesa/program/prog_hash_table.c                 |  67 ----
 src/mesa/program/symbol_table.c                    |  15 +-
 src/mesa/state_tracker/st_glsl_to_nir.cpp          |   2 +-
 src/util/Makefile.sources                          |   2 +
 src/util/hash_table.h                              |  13 +
 src/{mesa/program => util}/string_to_uint_map.cpp  |   2 +-
 src/util/string_to_uint_map.h                      | 173 ++++++++++
 38 files changed, 466 insertions(+), 675 deletions(-)
 delete mode 100644 src/mesa/program/hash_table.h
 delete mode 100644 src/mesa/program/prog_hash_table.c
 rename src/{mesa/program => util}/string_to_uint_map.cpp (97%)
 create mode 100644 src/util/string_to_uint_map.h

-- 
2.9.2



More information about the mesa-dev mailing list