From 4d844cfa56220b7de8ca676ad222d89f81c60c09 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Fri, 29 Nov 2013 00:11:12 -0800 Subject: glsl/loops: Get rid of loop_variable_state::max_iterations. This value is now redundant with loop_variable_state::limiting_terminator->iterations and ir_loop::normative_bound. Reviewed-by: Ian Romanick --- src/glsl/loop_unroll.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/glsl/loop_unroll.cpp') diff --git a/src/glsl/loop_unroll.cpp b/src/glsl/loop_unroll.cpp index e100916..9472bc5 100644 --- a/src/glsl/loop_unroll.cpp +++ b/src/glsl/loop_unroll.cpp @@ -236,14 +236,14 @@ loop_unroll_visitor::visit_leave(ir_loop *ir) return visit_continue; } - iterations = ls->max_iterations; - /* Don't try to unroll loops where the number of iterations is not known * at compile-time. */ - if (iterations < 0) + if (ir->normative_bound < 0) return visit_continue; + iterations = ir->normative_bound; + /* Don't try to unroll loops that have zillions of iterations either. */ if (iterations > (int) max_iterations) -- cgit v1.1