diff options
author | marha <marha@users.sourceforge.net> | 2014-01-15 21:23:25 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-01-15 21:23:25 +0100 |
commit | 1b0fcca503ae9cf2d462b60770f96c794dfbb27a (patch) | |
tree | d08c81de02b94da202195d84c99e192bc24ae69e /mesalib/src/glsl/opt_copy_propagation.cpp | |
parent | aaeb8bf497c82efabc4f9b27c319042c0e72d816 (diff) | |
download | vcxsrv-1b0fcca503ae9cf2d462b60770f96c794dfbb27a.tar.gz vcxsrv-1b0fcca503ae9cf2d462b60770f96c794dfbb27a.tar.bz2 vcxsrv-1b0fcca503ae9cf2d462b60770f96c794dfbb27a.zip |
mesa xkeyboard-config xserver git update 15 jan 2014
xserver commit 2d2d49dab5c5718989de97d7227aac793479745e
xkeyboard-config commit 78af7aa79c6552924295644b911e45d07a0fcdad
mesa commit a05c596a00916ce6a9c9d35ff36cd1e401fddd43
Diffstat (limited to 'mesalib/src/glsl/opt_copy_propagation.cpp')
-rw-r--r-- | mesalib/src/glsl/opt_copy_propagation.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/mesalib/src/glsl/opt_copy_propagation.cpp b/mesalib/src/glsl/opt_copy_propagation.cpp index db5dfc153..195cc8baa 100644 --- a/mesalib/src/glsl/opt_copy_propagation.cpp +++ b/mesalib/src/glsl/opt_copy_propagation.cpp @@ -167,8 +167,8 @@ ir_copy_propagation_visitor::visit(ir_dereference_variable *ir) ir_variable *var = ir->var; - foreach_iter(exec_list_iterator, iter, *this->acp) { - acp_entry *entry = (acp_entry *)iter.get(); + foreach_list(n, this->acp) { + acp_entry *entry = (acp_entry *) n; if (var == entry->lhs) { ir->var = entry->rhs; @@ -185,15 +185,14 @@ ir_visitor_status ir_copy_propagation_visitor::visit_enter(ir_call *ir) { /* Do copy propagation on call parameters, but skip any out params */ - exec_list_iterator sig_param_iter = ir->callee->parameters.iterator(); - foreach_iter(exec_list_iterator, iter, ir->actual_parameters) { - ir_variable *sig_param = (ir_variable *)sig_param_iter.get(); - ir_instruction *ir = (ir_instruction *)iter.get(); + foreach_two_lists(formal_node, &ir->callee->parameters, + actual_node, &ir->actual_parameters) { + ir_variable *sig_param = (ir_variable *) formal_node; + ir_rvalue *ir = (ir_rvalue *) actual_node; if (sig_param->data.mode != ir_var_function_out && sig_param->data.mode != ir_var_function_inout) { ir->accept(this); } - sig_param_iter.next(); } /* Since we're unlinked, we don't (necessarily) know the side effects of @@ -217,8 +216,8 @@ ir_copy_propagation_visitor::handle_if_block(exec_list *instructions) this->killed_all = false; /* Populate the initial acp with a copy of the original */ - foreach_iter(exec_list_iterator, iter, *orig_acp) { - acp_entry *a = (acp_entry *)iter.get(); + foreach_list(n, orig_acp) { + acp_entry *a = (acp_entry *) n; this->acp->push_tail(new(this->mem_ctx) acp_entry(a->lhs, a->rhs)); } @@ -233,8 +232,8 @@ ir_copy_propagation_visitor::handle_if_block(exec_list *instructions) this->acp = orig_acp; this->killed_all = this->killed_all || orig_killed_all; - foreach_iter(exec_list_iterator, iter, *new_kills) { - kill_entry *k = (kill_entry *)iter.get(); + foreach_list(n, new_kills) { + kill_entry *k = (kill_entry *) n; kill(k->var); } } @@ -277,8 +276,8 @@ ir_copy_propagation_visitor::visit_enter(ir_loop *ir) this->acp = orig_acp; this->killed_all = this->killed_all || orig_killed_all; - foreach_iter(exec_list_iterator, iter, *new_kills) { - kill_entry *k = (kill_entry *)iter.get(); + foreach_list(n, new_kills) { + kill_entry *k = (kill_entry *) n; kill(k->var); } @@ -292,8 +291,8 @@ ir_copy_propagation_visitor::kill(ir_variable *var) assert(var != NULL); /* Remove any entries currently in the ACP for this kill. */ - foreach_iter(exec_list_iterator, iter, *acp) { - acp_entry *entry = (acp_entry *)iter.get(); + foreach_list_safe(n, acp) { + acp_entry *entry = (acp_entry *) n; if (entry->lhs == var || entry->rhs == var) { entry->remove(); |