diff options
author | Eric Anholt <eric@anholt.net> | 2010-06-25 13:38:38 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-06-25 13:38:38 -0700 |
commit | bda27424cf04c0d2ec2b49c56f562d5b2d2f0bff (patch) | |
tree | def596e4d7ba78af3bf590e785d76f9260100802 /src/glsl/ir_optimization.h | |
parent | abc4e52992c53ee6b6895480b47e6a6e27ef9bd0 (diff) | |
download | external_mesa3d-bda27424cf04c0d2ec2b49c56f562d5b2d2f0bff.zip external_mesa3d-bda27424cf04c0d2ec2b49c56f562d5b2d2f0bff.tar.gz external_mesa3d-bda27424cf04c0d2ec2b49c56f562d5b2d2f0bff.tar.bz2 |
glsl2: Use the parser state as the talloc context for dead code elimination.
This cuts runtime by around 20% from talloc_parent() lookups.
Diffstat (limited to 'src/glsl/ir_optimization.h')
-rw-r--r-- | src/glsl/ir_optimization.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/glsl/ir_optimization.h b/src/glsl/ir_optimization.h index 432a334..147f921 100644 --- a/src/glsl/ir_optimization.h +++ b/src/glsl/ir_optimization.h @@ -32,9 +32,11 @@ bool do_constant_folding(exec_list *instructions); bool do_constant_variable(exec_list *instructions); bool do_constant_variable_unlinked(exec_list *instructions); bool do_copy_propagation(exec_list *instructions); -bool do_dead_code(exec_list *instructions); +bool do_dead_code(struct _mesa_glsl_parse_state *state, + exec_list *instructions); bool do_dead_code_local(exec_list *instructions); -bool do_dead_code_unlinked(exec_list *instructions); +bool do_dead_code_unlinked(struct _mesa_glsl_parse_state *state, + exec_list *instructions); bool do_function_inlining(exec_list *instructions); bool do_if_simplification(exec_list *instructions); bool do_swizzle_swizzle(exec_list *instructions); |