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:
Matt Turner
2014-06-24 21:58:35 -07:00
parent e0cb82d0c4
commit c6a16f6d0e
20 changed files with 41 additions and 87 deletions
+3 -9
View File
@@ -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