diff options
author | Matt Turner <[email protected]> | 2014-06-24 21:34:05 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-07-01 08:55:51 -0700 |
commit | 4d78446d782e2d942b4cd0cd00a27bf922ccd479 (patch) | |
tree | eaaa99ce79c54ddef6cf35c8d3d028b9e0aa44b4 /src/glsl/opt_cse.cpp | |
parent | da9f0316e6ea628c085040a0c145580301207489 (diff) |
glsl: Use typed foreach_in_list instead of foreach_list.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/opt_cse.cpp')
-rw-r--r-- | src/glsl/opt_cse.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/glsl/opt_cse.cpp b/src/glsl/opt_cse.cpp index 1b8782bcb2b..0e720cc2686 100644 --- a/src/glsl/opt_cse.cpp +++ b/src/glsl/opt_cse.cpp @@ -173,9 +173,7 @@ dump_ae(exec_list *ae) int i = 0; printf("CSE: AE contents:\n"); - foreach_list(node, ae) { - ae_entry *entry = (ae_entry *)node; - + foreach_in_list(ae_entry, entry, ae) { printf("CSE: AE %2d (%p): ", i, entry); (*entry->val)->print(); printf("\n"); @@ -254,9 +252,7 @@ is_cse_candidate(ir_rvalue *ir) ir_rvalue * cse_visitor::try_cse(ir_rvalue *rvalue) { - foreach_list(node, ae) { - ae_entry *entry = (ae_entry *)node; - + foreach_in_list(ae_entry, entry, ae) { if (debug) { printf("Comparing to AE %p: ", entry); (*entry->val)->print(); @@ -303,8 +299,7 @@ cse_visitor::try_cse(ir_rvalue *rvalue) * updated so that any further elimination from inside gets its new * assignments put before our new assignment. */ - foreach_list(fixup_node, ae) { - ae_entry *fixup_entry = (ae_entry *)fixup_node; + foreach_in_list(ae_entry, fixup_entry, ae) { if (contains_rvalue(assignment->rhs, *fixup_entry->val)) fixup_entry->base_ir = assignment; } |