Overview
SPIRV-Fuzz has a transformation that inserts OpCopyObject instructions into the module. The result of this instruction can later be used to replace the usages of the original object. The SPIR-V language has two more instructions that perform a similar task: OpCopyMemory and OpCopyMemorySized. This transformation will randomly insert these instructions into the module.
Implementation details
A simple implementation here would be to just randomly introduce these instructions to the module. We should make sure that they are only used with pointer types. Additionally, we would need to make sure that every use of an original id is replaced with the copied one if we decide to do so. (We could probably implement a separate transformation for that).