summaryrefslogtreecommitdiff
path: root/ir_dead_code.cpp
AgeCommit message (Collapse)Author
2010-04-29ir_dead_code: Fix segfault on handling a return statement with no value.Eric Anholt
2010-04-21Fix ir_dead_code for function refactoring.Kenneth Graunke
2010-04-19Remove dead code assignments and variable declarations.Eric Anholt
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.