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_constant_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_constant_propagation.cpp')
-rw-r--r-- | mesalib/src/glsl/opt_constant_propagation.cpp | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/mesalib/src/glsl/opt_constant_propagation.cpp b/mesalib/src/glsl/opt_constant_propagation.cpp index f1a6fbdaa..18f5da689 100644 --- a/mesalib/src/glsl/opt_constant_propagation.cpp +++ b/mesalib/src/glsl/opt_constant_propagation.cpp @@ -172,8 +172,8 @@ ir_constant_propagation_visitor::handle_rvalue(ir_rvalue **rvalue) channel = i; } - 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 (entry->var == deref->var && entry->write_mask & (1 << channel)) { found = entry; break; @@ -281,10 +281,10 @@ ir_visitor_status ir_constant_propagation_visitor::visit_enter(ir_call *ir) { /* Do constant 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_rvalue *param = (ir_rvalue *)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 *param = (ir_rvalue *) actual_node; if (sig_param->data.mode != ir_var_function_out && sig_param->data.mode != ir_var_function_inout) { ir_rvalue *new_param = param; @@ -294,7 +294,6 @@ ir_constant_propagation_visitor::visit_enter(ir_call *ir) else param->accept(this); } - sig_param_iter.next(); } /* Since we're unlinked, we don't (necssarily) know the side effects of @@ -318,8 +317,8 @@ ir_constant_propagation_visitor::handle_if_block(exec_list *instructions) this->killed_all = false; /* Populate the initial acp with a constant 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)); } @@ -334,8 +333,8 @@ ir_constant_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, k->write_mask); } } @@ -379,8 +378,8 @@ ir_constant_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, k->write_mask); } @@ -398,8 +397,8 @@ ir_constant_propagation_visitor::kill(ir_variable *var, unsigned write_mask) return; /* Remove any entries currently in the ACP for this kill. */ - foreach_iter(exec_list_iterator, iter, *this->acp) { - acp_entry *entry = (acp_entry *)iter.get(); + foreach_list_safe(n, this->acp) { + acp_entry *entry = (acp_entry *) n; if (entry->var == var) { entry->write_mask &= ~write_mask; @@ -411,8 +410,8 @@ ir_constant_propagation_visitor::kill(ir_variable *var, unsigned write_mask) /* Add this writemask of the variable to the list of killed * variables in this block. */ - foreach_iter(exec_list_iterator, iter, *this->kills) { - kill_entry *entry = (kill_entry *)iter.get(); + foreach_list(n, this->kills) { + kill_entry *entry = (kill_entry *) n; if (entry->var == var) { entry->write_mask |= write_mask; |