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:
Paul Berry
2013-11-28 08:13:41 -08:00
parent 2c17f97fe6
commit e00b93a1f7
46 changed files with 103 additions and 246 deletions

View File

@@ -524,17 +524,8 @@ void
ir_print_visitor::visit(ir_loop *ir)
{
printf("(loop (");
if (ir->counter != NULL)
ir->counter->accept(this);
printf(") (");
if (ir->from != NULL)
ir->from->accept(this);
printf(") (");
if (ir->to != NULL)
ir->to->accept(this);
printf(") (");
if (ir->increment != NULL)
ir->increment->accept(this);
if (ir->normative_bound >= 0)
printf("%d", ir->normative_bound);
printf(") (\n");
indentation++;