glsl2: Add a pass for removing unused functions.
authorEric Anholt <eric@anholt.net>
Thu, 5 Aug 2010 17:09:12 +0000 (10:09 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 5 Aug 2010 17:18:31 +0000 (10:18 -0700)
commit2e853ca23c8670246dd4efcee0706f68097652f7
tree9b5e1f32cf565e3367f574d4c918e676e0d68060
parentc5b9cab49900cbcab78911361976a3678d49e853
glsl2: Add a pass for removing unused functions.

For a shader involving many small functions, this avoids running
optimization across all of them after they've been inlined
post-linking.

Reduces the runtime of linking and running a fragment shader from Yo
Frankie from 1.6 seconds to 0.9 seconds (-44.9%, +/- 3.3%).
src/glsl/Makefile
src/glsl/glsl_symbol_table.h
src/glsl/ir.h
src/glsl/ir_dead_functions.cpp [new file with mode: 0644]
src/glsl/ir_optimization.h
src/glsl/linker.cpp