nir/inline: Don't use foreach_instr_safe unless we need to
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 27 May 2016 16:25:51 +0000 (09:25 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 27 May 2016 17:28:27 +0000 (10:28 -0700)
Suggested-by: Connor Abbott <cwabbott0@gmail.com>
src/compiler/nir/nir_inline_functions.c

index 4641e8cc20e96a43c0e07087b53343b2b74fa4c1..5f9dae40994d29e00c3079e2015f7f419c56d641 100644 (file)
@@ -30,7 +30,7 @@ static bool inline_function_impl(nir_function_impl *impl, struct set *inlined);
 static bool
 rewrite_param_derefs_block(nir_block *block, nir_call_instr *call)
 {
-   nir_foreach_instr_safe(instr, block) {
+   nir_foreach_instr(instr, block) {
       if (instr->type != nir_instr_type_intrinsic)
          continue;
 
@@ -89,7 +89,7 @@ lower_param_to_local(nir_variable *param, nir_function_impl *impl, bool write)
 static bool
 lower_params_to_locals_block(nir_block *block, nir_function_impl *impl)
 {
-   nir_foreach_instr_safe(instr, block) {
+   nir_foreach_instr(instr, block) {
       if (instr->type != nir_instr_type_intrinsic)
          continue;