nir: Add a nir_foreach_function_temp_variable helper
[mesa.git] / src / compiler / nir / nir_opt_large_constants.c
index ef51c72b7b67149ce756f0b9e56a963df6314c6c..2575407ca0b5b4e3bb72b745a1a1e2f30e364cd2 100644 (file)
@@ -185,7 +185,7 @@ nir_opt_large_constants(nir_shader *shader,
    }
 
    struct var_info *var_infos = ralloc_array(NULL, struct var_info, num_locals);
-   nir_foreach_variable(var, &impl->locals) {
+   nir_foreach_function_temp_variable(var, impl) {
       var_infos[var->index] = (struct var_info) {
          .var = var,
          .is_constant = true,