summaryrefslogtreecommitdiff
path: root/ir_dead_code.cpp
AgeCommit message (Collapse)Author
2010-06-24Move the talloc_parent lookup down in a few hot paths.Eric Anholt
talloc_parent is still 80% of our runtime, but likely talloc_parent lookups will be reduced as we improve the handling of memory ownership.
2010-06-23exec_node: Add new talloc-based new()Carl Worth
And fix all callers to use the tallbac-based new for exec_node construction. We make ready use of talloc_parent in order to get valid, (and appropriate) talloc owners for everything we construct without having to add new 'ctx' parameters up and down all the call trees. This closes the majority of the memory leaks in the glsl-orangebook-ch06-bump.frag test: total heap usage: 55,623 allocs, 42,672 frees (was 14,533 frees) Now 76.7% leak-free. Woo-hoo!
2010-06-22Include stdio.h and stdlib.h everywhere, and don't cook our own #define NULL.Eric Anholt
2010-05-26Refactor ir_dereference support for ir_hierarchical_visitorIan Romanick
Move the accept method for hierarchical visitors from ir_dereference to the derived classes. This was mostly straight-forward, but I suspect that ir_dead_code_local may be broken now.
2010-05-18Use ir_rvalue::variable_referenced instead of open coding itIan Romanick
2010-05-17Reimplement ir_dead_code_visitor using ir_hierarchical_vistorIan Romanick
The output of all test cases was verified to be the same using diff.
2010-05-17Replace find_dead_code with visit_exec_listIan Romanick
find_dead_code appears to be an open-coded version of visit_exec_list that was implemented first.
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.