diff options
author | marha <marha@users.sourceforge.net> | 2014-01-15 21:37:10 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-01-15 21:37:10 +0100 |
commit | b7f01cb1f6cfd1ec301f650a073436c91ec614aa (patch) | |
tree | 1dbf32344313ad7e5884e6686251cad398a231fa /mesalib/src/glsl/opt_constant_propagation.cpp | |
parent | 7b4b94b4449aec056c4c92f5cacc2f89a292a80e (diff) | |
parent | 1b0fcca503ae9cf2d462b60770f96c794dfbb27a (diff) | |
download | vcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.tar.gz vcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.tar.bz2 vcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
mesa xkeyboard-config xserver git update 15 jan 2014
randrproto libfontenc mesa xserver git update 10 Jan 2014
randsrproto fontconfig libX11 git update 6 Jan 2014
Conflicts:
mesalib/src/glsl/builtin_functions.cpp
mesalib/src/glsl/ir_builder.h
xorg-server/Xext/xres.c
xorg-server/dix/dispatch.c
xorg-server/dix/dixfonts.c
xorg-server/hw/xwin/wingc.c
xorg-server/hw/xwin/winwindowswm.c
xorg-server/include/gc.h
xorg-server/os/access.c
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; |