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/opt_copy_propagation_elements.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/opt_copy_propagation_elements.cpp')
-rw-r--r-- | src/glsl/opt_copy_propagation_elements.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/glsl/opt_copy_propagation_elements.cpp b/src/glsl/opt_copy_propagation_elements.cpp index bcd79187a4d..f5f59b7d34a 100644 --- a/src/glsl/opt_copy_propagation_elements.cpp +++ b/src/glsl/opt_copy_propagation_elements.cpp @@ -340,8 +340,7 @@ ir_copy_propagation_elements_visitor::handle_if_block(exec_list *instructions) /* Move the new kills into the parent block's list, removing them * from the parent's ACP list in the process. */ - foreach_list_safe(node, new_kills) { - kill_entry *k = (kill_entry *)node; + foreach_in_list_safe(kill_entry, k, new_kills) { kill(k); } } @@ -384,8 +383,7 @@ ir_copy_propagation_elements_visitor::visit_enter(ir_loop *ir) this->acp = orig_acp; this->killed_all = this->killed_all || orig_killed_all; - foreach_list_safe(node, new_kills) { - kill_entry *k = (kill_entry *)node; + foreach_in_list_safe(kill_entry, k, new_kills) { kill(k); } @@ -397,9 +395,7 @@ ir_copy_propagation_elements_visitor::visit_enter(ir_loop *ir) void ir_copy_propagation_elements_visitor::kill(kill_entry *k) { - foreach_list_safe(node, acp) { - acp_entry *entry = (acp_entry *)node; - + foreach_in_list_safe(acp_entry, entry, acp) { if (entry->lhs == k->var) { entry->write_mask = entry->write_mask & ~k->write_mask; if (entry->write_mask == 0) { |