glsl: Use hash tables in opt_constant_variable().
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 5 Sep 2015 07:22:57 +0000 (00:22 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 11 Sep 2015 07:01:24 +0000 (00:01 -0700)
commit2fc0ce293ac58237f02cc5dd2eee4e35abea06b5
tree3a412f86a441aa43529e821d9bc7b194e2b3ff03
parent4603723722127e707a5c1fa28736ee932f326846
glsl: Use hash tables in opt_constant_variable().

Cuts compile/link time of the fragment shader in bug #91857 by 31%
(31.79 -> 21.64).  It has over 8,000 variables so linked lists are
terrible.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91857
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
Tested-by: Tapani Pälli <tapani.palli@intel.com>
src/glsl/opt_constant_variable.cpp