Remove dead code assignments and variable declarations.
authorEric Anholt <eric@anholt.net>
Fri, 16 Apr 2010 23:43:47 +0000 (16:43 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 19 Apr 2010 22:33:52 +0000 (15:33 -0700)
commit7d21104a8b92c139051e9a224c5d863802a8ade6
tree9fbd9d256c6bd64063439c0adfbd95ec5561a64d
parent71df19f5ef6e78beb5160801f81468184b75447e
Remove dead code assignments and variable declarations.

This pass only works on assignments where the variable is never
referenced.  There is no code flow analysis, so it can't do a better
job of avoiding redundant assignments.

For now, the optimizer only does do_dead_code_unlinked(), so it won't
trim the builtin variable list or initializers outside of the scope of
functions.  This is because we don't have the visibility into other
functions that might get linked in in order to eliminate work on
global variables.
Makefile.am
glsl_parser_extras.cpp
ir.h
ir_dead_code.cpp [new file with mode: 0644]
ir_dead_code.h [new file with mode: 0644]