History log of /external/mesa3d/src/glsl/loop_analysis.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0405bd08ca0e01ebc68891ee1ff47d320983f775 28-Mar-2012 Kenneth Graunke <kenneth@whitecape.org> glsl: Don't trust loop analysis in the presence of function calls.

Function calls may have side effects that alter variables used inside
the loop. In the fragment shader, they may even terminate the shader.
This means our analysis about loop-constant or induction variables may
be completely wrong.

In general it's impossible to determine whether they actually do or not
(due to the halting problem), so we'd need to perform conservative
static analysis. For now, it's not worth the complexity: most functions
will be inlined, at which point we can unroll them successfully.

Fixes Piglit tests:
- shaders/glsl-fs-unroll-out-param
- shaders/glsl-fs-unroll-side-effect

NOTE: This is a candidate for release branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/glsl/loop_analysis.cpp
d3073f58c17d8675a2ecdd5dfa83e5520c78e1a8 21-Jan-2011 Kenneth Graunke <kenneth@whitecape.org> Convert everything from the talloc API to the ralloc API.
/external/mesa3d/src/glsl/loop_analysis.cpp
58c988ada56114b56477983f66b4039219f1a82c 18-Jan-2011 Eric Anholt <eric@anholt.net> glsl: Skip the rest of loop unrolling if no loops were found.

Shaves 1.6% (+/- 1.0%) off of ff_fragment_shader glean texCombine time
(n=5).
/external/mesa3d/src/glsl/loop_analysis.cpp
6929cdd14bf90d5b145039265f2d43ded52020a3 08-Nov-2010 Eric Anholt <eric@anholt.net> glsl: Free the loop state context when we free the loop state.

Since this was talloced off of NULL instead of the compile state, it
was a real leak over the course of the program. Noticed with
valgrind --leak-check=full --show-reachable=yes. We should really
change these passes to generally get the compile context as an argument
so simple mistakes like this stop mattering.
/external/mesa3d/src/glsl/loop_analysis.cpp
956f049fd24eb5239361e68a1f27e1bebb3315a0 07-Sep-2010 Ian Romanick <ian.d.romanick@intel.com> glsl2: Early return with visit_continue in loop_analysis::visit(ir_dereference_variable *)

Returning early with visit_continue_with_parent prevented the
then-statements and else-statements of if-statements such as the
following from being processed:

if (some_var) { ... } else { ... }

Fixes piglit test case glsl-fs-loop-nested-if and bugzilla #30030.
/external/mesa3d/src/glsl/loop_analysis.cpp
f061524f0737bf59dad6ab9bb2e0015df804e4b5 02-Sep-2010 Ian Romanick <ian.d.romanick@intel.com> glsl2: Use as_constant some places instead of constant_expression_value

The places where constant_expression_value are still used in loop
analysis are places where a new expression tree is created and
constant folding won't have happened. This is used, for example, when
we try to determine the maximal loop iteration count.

Based on review comments by Eric. "...rely on constant folding to
have done its job, instead of going all through the subtree again when
it wasn't a constant."
/external/mesa3d/src/glsl/loop_analysis.cpp
3bcfafcf0320ee5407716ff67062e80d162760d4 28-Aug-2010 Ian Romanick <ian.d.romanick@intel.com> glsl2: Track the number of ir_loop_jump instructions that are in a loop
/external/mesa3d/src/glsl/loop_analysis.cpp
9434a0749f26c640305f68ef85d17a31063a5705 27-Aug-2010 Ian Romanick <ian.d.romanick@intel.com> glsl2: Add module to analyze variables used in loops

This is the first step eventually leading to loop unrolling.
/external/mesa3d/src/glsl/loop_analysis.cpp