aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/opt_cse.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-07-04 19:52:56 +0200
committermarha <marha@users.sourceforge.net>2014-07-04 19:52:56 +0200
commit62ed212e1add98e39c0f7a6e5a8a5726d66f161e (patch)
treea80c4bf566c76665b3449f13fac7de72c66aa80a /mesalib/src/glsl/opt_cse.cpp
parent3095a03ec3cb1f05b49362327d10a767299d7635 (diff)
parentfe03d6aef6338e43593f164b09ae993bcd0ecbdd (diff)
downloadvcxsrv-62ed212e1add98e39c0f7a6e5a8a5726d66f161e.tar.gz
vcxsrv-62ed212e1add98e39c0f7a6e5a8a5726d66f161e.tar.bz2
vcxsrv-62ed212e1add98e39c0f7a6e5a8a5726d66f161e.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/glsl/opt_cse.cpp')
-rw-r--r--mesalib/src/glsl/opt_cse.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/mesalib/src/glsl/opt_cse.cpp b/mesalib/src/glsl/opt_cse.cpp
index 1b8782bcb..0e720cc26 100644
--- a/mesalib/src/glsl/opt_cse.cpp
+++ b/mesalib/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;
}