glsl: Use typed foreach_in_list_safe instead of foreach_list_safe.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user