-static bool
-copy_prop_dest(nir_dest *dest, nir_instr *instr)
-{
- if (!dest->is_ssa && dest->reg.indirect)
- return copy_prop_src(dest->reg.indirect, instr, NULL, 1);
-
- return false;
-}
-
-static bool
-copy_prop_deref_var(nir_instr *instr, nir_deref_var *deref_var)
-{
- if (!deref_var)
- return false;
-
- bool progress = false;
- for (nir_deref *deref = deref_var->deref.child;
- deref; deref = deref->child) {
- if (deref->deref_type != nir_deref_type_array)
- continue;
-
- nir_deref_array *arr = nir_deref_as_array(deref);
- if (arr->deref_array_type != nir_deref_array_type_indirect)
- continue;
-
- while (copy_prop_src(&arr->indirect, instr, NULL, 1))
- progress = true;
- }
- return progress;
-}
-