diff options
author | Matt Turner <[email protected]> | 2014-06-24 21:58:35 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-07-01 08:55:51 -0700 |
commit | c6a16f6d0e489e6d2a1a75bcf34be00e892b3120 (patch) | |
tree | 493e9bd86b9bad457bca713372c5c48718b6eaa0 /src/glsl/loop_analysis.cpp | |
parent | e0cb82d0c4ceba437c351d1e37fdb86fe5aed997 (diff) |
glsl: Use typed foreach_in_list_safe instead of foreach_list_safe.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/loop_analysis.cpp')
-rw-r--r-- | src/glsl/loop_analysis.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/glsl/loop_analysis.cpp b/src/glsl/loop_analysis.cpp index 0e232e7b514..21d46ebce53 100644 --- a/src/glsl/loop_analysis.cpp +++ b/src/glsl/loop_analysis.cpp @@ -300,9 +300,7 @@ loop_analysis::visit_leave(ir_loop *ir) } - foreach_list_safe(node, &ls->variables) { - loop_variable *lv = (loop_variable *) node; - + foreach_in_list_safe(loop_variable, lv, &ls->variables) { /* Move variables that are already marked as being loop constant to * a separate list. These trivially don't need to be tested. */ @@ -330,9 +328,7 @@ loop_analysis::visit_leave(ir_loop *ir) do { progress = false; - foreach_list_safe(node, &ls->variables) { - loop_variable *lv = (loop_variable *) node; - + foreach_in_list_safe(loop_variable, lv, &ls->variables) { if (lv->conditional_or_nested_assignment || (lv->num_assignments > 1)) continue; @@ -356,9 +352,7 @@ loop_analysis::visit_leave(ir_loop *ir) /* The remaining variables that are not loop invariant might be loop * induction variables. */ - foreach_list_safe(node, &ls->variables) { - loop_variable *lv = (loop_variable *) node; - + foreach_in_list_safe(loop_variable, lv, &ls->variables) { /* If there is more than one assignment to a variable, it cannot be a * loop induction variable. This isn't strictly true, but this is a * very simple induction variable detector, and it can't handle more |