glsl2: Add a pass to break ir_binop_div to _mul and _rcp.

This results in constant folding of a constant divisor.
This commit is contained in:
Eric Anholt
2010-07-02 11:27:06 -07:00
parent 667f4e1940
commit 9a0e421983
4 changed files with 81 additions and 3 deletions

View File

@@ -37,6 +37,7 @@ bool do_dead_code(struct _mesa_glsl_parse_state *state,
bool do_dead_code_local(exec_list *instructions);
bool do_dead_code_unlinked(struct _mesa_glsl_parse_state *state,
exec_list *instructions);
bool do_div_to_mul_rcp(exec_list *instructions);
bool do_function_inlining(exec_list *instructions);
bool do_if_simplification(exec_list *instructions);
bool do_mod_to_fract(exec_list *instructions);