diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2016-04-26 20:26:42 -0700 |
---|---|---|
committer | Jason Ekstrand <jason.ekstrand@intel.com> | 2016-04-28 15:54:48 -0700 |
commit | 9464d8c49813aba77285e7465b96e92a91ed327c (patch) | |
tree | e39fa6395b6e5fd1eba81fb1520cf047c91cd5f2 /src/compiler/nir/nir_remove_dead_variables.c | |
parent | e63766fb4b54bc88756ee7e82c3ff8cec0dc5561 (diff) | |
download | external_mesa3d-9464d8c49813aba77285e7465b96e92a91ed327c.zip external_mesa3d-9464d8c49813aba77285e7465b96e92a91ed327c.tar.gz external_mesa3d-9464d8c49813aba77285e7465b96e92a91ed327c.tar.bz2 |
nir: Switch the arguments to nir_foreach_function
This matches the "foreach x in container" pattern found in many other
programming languages. Generated by the following regular expression:
s/nir_foreach_function(\([^,]*\),\s*\([^,]*\))/nir_foreach_function(\2, \1)/
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/compiler/nir/nir_remove_dead_variables.c')
-rw-r--r-- | src/compiler/nir/nir_remove_dead_variables.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_remove_dead_variables.c b/src/compiler/nir/nir_remove_dead_variables.c index 1f3561d..f7429eb 100644 --- a/src/compiler/nir/nir_remove_dead_variables.c +++ b/src/compiler/nir/nir_remove_dead_variables.c @@ -68,7 +68,7 @@ add_var_use_tex(nir_tex_instr *instr, struct set *live) static void add_var_use_shader(nir_shader *shader, struct set *live) { - nir_foreach_function(shader, function) { + nir_foreach_function(function, shader) { if (function->impl) { nir_foreach_block(block, function->impl) { nir_foreach_instr(instr, block) { @@ -136,7 +136,7 @@ nir_remove_dead_variables(nir_shader *shader, nir_variable_mode modes) progress = remove_dead_vars(&shader->system_values, live) || progress; if (modes & nir_var_local) { - nir_foreach_function(shader, function) { + nir_foreach_function(function, shader) { if (function->impl) { if (remove_dead_vars(&function->impl->locals, live)) { nir_metadata_preserve(function->impl, nir_metadata_block_index | |