summaryrefslogtreecommitdiff
path: root/src/glsl/main.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-11-24 23:54:03 -0800
committerKenneth Graunke <kenneth@whitecape.org>2010-11-25 01:21:05 -0800
commita82592de9219e7d8c344275066ec5870a1c0ba45 (patch)
tree1f74ee13da84706d2632f53c3fd66365d749ebd7 /src/glsl/main.cpp
parente8a24c65bc06a2a098c05728df0da1e5ed61b1de (diff)
glsl: Use do_common_optimization in the standalone compiler.
NOTE: This is a candidate for the 7.9 branch.
Diffstat (limited to 'src/glsl/main.cpp')
-rw-r--r--src/glsl/main.cpp21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
index 33028512644..c8fc2676253 100644
--- a/src/glsl/main.cpp
+++ b/src/glsl/main.cpp
@@ -218,26 +218,7 @@ compile_shader(struct gl_context *ctx, struct gl_shader *shader)
if (!state->error && !shader->ir->is_empty()) {
bool progress;
do {
- progress = false;
-
- progress = do_function_inlining(shader->ir) || progress;
- progress = do_if_simplification(shader->ir) || progress;
- progress = do_copy_propagation(shader->ir) || progress;
- progress = do_dead_code_local(shader->ir) || progress;
- progress = do_dead_code_unlinked(shader->ir) || progress;
- progress = do_tree_grafting(shader->ir) || progress;
- progress = do_constant_propagation(shader->ir) || progress;
- progress = do_constant_variable_unlinked(shader->ir) || progress;
- progress = do_constant_folding(shader->ir) || progress;
- progress = do_algebraic(shader->ir) || progress;
- progress = do_vec_index_to_swizzle(shader->ir) || progress;
- progress = do_vec_index_to_cond_assign(shader->ir) || progress;
- progress = do_swizzle_swizzle(shader->ir) || progress;
-
- loop_state *ls = analyze_loop_variables(shader->ir);
- progress = set_loop_controls(shader->ir, ls) || progress;
- progress = unroll_loops(shader->ir, ls, 32) || progress;
- delete ls;
+ progress = do_common_optimization(shader->ir, false, 32);
} while (progress);
validate_ir_tree(shader->ir);