diff options
author | Paul Berry <stereotype441@gmail.com> | 2013-11-28 08:13:41 -0800 |
---|---|---|
committer | Paul Berry <stereotype441@gmail.com> | 2013-12-09 10:54:33 -0800 |
commit | e00b93a1f7b4bc7f5e887591c000524e13f80826 (patch) | |
tree | 4bfdfa0f56747019aed8c427fb3349adc1e53e7e /src/glsl/ir_variable_refcount.cpp | |
parent | 2c17f97fe6a40e4a963fb4eec0ea0555f562b1be (diff) | |
download | external_mesa3d-e00b93a1f7b4bc7f5e887591c000524e13f80826.zip external_mesa3d-e00b93a1f7b4bc7f5e887591c000524e13f80826.tar.gz external_mesa3d-e00b93a1f7b4bc7f5e887591c000524e13f80826.tar.bz2 |
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>
Diffstat (limited to 'src/glsl/ir_variable_refcount.cpp')
-rw-r--r-- | src/glsl/ir_variable_refcount.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/glsl/ir_variable_refcount.cpp b/src/glsl/ir_variable_refcount.cpp index 425ed81..923eb1a 100644 --- a/src/glsl/ir_variable_refcount.cpp +++ b/src/glsl/ir_variable_refcount.cpp @@ -132,24 +132,3 @@ ir_variable_refcount_visitor::visit_leave(ir_assignment *ir) return visit_continue; } - - -ir_visitor_status -ir_variable_refcount_visitor::visit_leave(ir_loop *ir) -{ - /* If the loop has a counter variable, it is implicitly referenced and - * assigned to. Note that since the LHS of an assignment is counted as a - * reference, we actually have to increment referenced_count by 2 so that - * later code will know that the variable isn't just assigned to. - */ - if (ir->counter != NULL) { - ir_variable_refcount_entry *entry = - this->get_variable_entry(ir->counter); - if (entry) { - entry->referenced_count += 2; - entry->assigned_count++; - } - } - - return visit_continue; -} |