glsl/loops: replace loop controls with a normative bound.
authorPaul Berry <stereotype441@gmail.com>
Thu, 28 Nov 2013 16:13:41 +0000 (08:13 -0800)
committerPaul Berry <stereotype441@gmail.com>
Mon, 9 Dec 2013 18:54:33 +0000 (10:54 -0800)
commite00b93a1f7b4bc7f5e887591c000524e13f80826
tree4bfdfa0f56747019aed8c427fb3349adc1e53e7e
parent2c17f97fe6a40e4a963fb4eec0ea0555f562b1be
glsl/loops: replace loop controls with a normative bound.

This patch replaces the ir_loop fields "from", "to", "increment",
"counter", and "cmp" with a single integer ("normative_bound") that
serves the same purpose.

I've used the name "normative_bound" to emphasize the fact that the
back-end is required to emit code to prevent the loop from running
more than normative_bound times.  (By contrast, an "informative" bound
would be a bound that is informational only).

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
46 files changed:
src/glsl/ir.cpp
src/glsl/ir.h
src/glsl/ir_clone.cpp
src/glsl/ir_hv_accept.cpp
src/glsl/ir_print_visitor.cpp
src/glsl/ir_reader.cpp
src/glsl/ir_validate.cpp
src/glsl/ir_variable_refcount.cpp
src/glsl/ir_variable_refcount.h
src/glsl/loop_analysis.h
src/glsl/loop_controls.cpp
src/glsl/lower_bounded_loops.cpp
src/glsl/tests/lower_jumps/lower_breaks_1.opt_test
src/glsl/tests/lower_jumps/lower_breaks_1.opt_test.expected
src/glsl/tests/lower_jumps/lower_breaks_2.opt_test
src/glsl/tests/lower_jumps/lower_breaks_2.opt_test.expected
src/glsl/tests/lower_jumps/lower_breaks_3.opt_test
src/glsl/tests/lower_jumps/lower_breaks_3.opt_test.expected
src/glsl/tests/lower_jumps/lower_breaks_4.opt_test
src/glsl/tests/lower_jumps/lower_breaks_4.opt_test.expected
src/glsl/tests/lower_jumps/lower_breaks_5.opt_test
src/glsl/tests/lower_jumps/lower_breaks_5.opt_test.expected
src/glsl/tests/lower_jumps/lower_breaks_6.opt_test
src/glsl/tests/lower_jumps/lower_breaks_6.opt_test.expected
src/glsl/tests/lower_jumps/lower_guarded_conditional_break.opt_test
src/glsl/tests/lower_jumps/lower_guarded_conditional_break.opt_test.expected
src/glsl/tests/lower_jumps/lower_pulled_out_jump.opt_test
src/glsl/tests/lower_jumps/lower_pulled_out_jump.opt_test.expected
src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test
src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test.expected
src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_nothing.opt_test
src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_nothing.opt_test.expected
src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return.opt_test
src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return.opt_test.expected
src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return_and_break.opt_test
src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return_and_break.opt_test.expected
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test.expected
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return.opt_test
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return.opt_test.expected
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return_and_break.opt_test
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return_and_break.opt_test.expected
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
src/mesa/program/ir_to_mesa.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp