Commit graph

5 commits

Author SHA1 Message Date
Ian Romanick
b5a7cf9344 Reimplement ir_dead_code_visitor using ir_hierarchical_vistor
The output of all test cases was verified to be the same using diff.
2010-05-17 12:03:13 -07:00
Ian Romanick
86790dd43f Replace find_dead_code with visit_exec_list
find_dead_code appears to be an open-coded version of visit_exec_list
that was implemented first.
2010-05-17 12:03:13 -07:00
Eric Anholt
438f38c55a ir_dead_code: Fix segfault on handling a return statement with no value. 2010-04-29 13:54:19 -07:00
Kenneth Graunke
6202cbfe36 Fix ir_dead_code for function refactoring. 2010-04-21 16:02:15 -07:00
Eric Anholt
7d21104a8b 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.
2010-04-19 15:33:52 -07:00