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>
This commit is contained in:
@@ -44,8 +44,7 @@ analyze_loop_variables(exec_list *instructions);
|
||||
*
|
||||
* (if (expression bool ...) (break))
|
||||
*
|
||||
* and fill in the \c ir_loop::from, \c ir_loop::to, and \c ir_loop::counter
|
||||
* fields of the \c ir_loop.
|
||||
* and fill in the \c normative_bound field of the \c ir_loop.
|
||||
*
|
||||
* In this process, some conditional break-statements may be eliminated
|
||||
* altogether. For example, if it is provable that one loop exit condition will
|
||||
|
Reference in New Issue
Block a user