summaryrefslogtreecommitdiffstats
path: root/src/glsl/loop_analysis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/loop_analysis.cpp')
-rw-r--r--src/glsl/loop_analysis.cpp12
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