summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_copy_propagation_elements.cpp
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2014-06-24 21:58:35 -0700
committerMatt Turner <mattst88@gmail.com>2014-07-01 08:55:51 -0700
commitc6a16f6d0e489e6d2a1a75bcf34be00e892b3120 (patch)
tree493e9bd86b9bad457bca713372c5c48718b6eaa0 /src/glsl/opt_copy_propagation_elements.cpp
parente0cb82d0c4ceba437c351d1e37fdb86fe5aed997 (diff)
downloadexternal_mesa3d-c6a16f6d0e489e6d2a1a75bcf34be00e892b3120.zip
external_mesa3d-c6a16f6d0e489e6d2a1a75bcf34be00e892b3120.tar.gz
external_mesa3d-c6a16f6d0e489e6d2a1a75bcf34be00e892b3120.tar.bz2
glsl: Use typed foreach_in_list_safe instead of foreach_list_safe.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/glsl/opt_copy_propagation_elements.cpp')
-rw-r--r--src/glsl/opt_copy_propagation_elements.cpp10
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 bcd7918..f5f59b7 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) {