nir: Add a helper for rewriting an instruction source

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
2 files changed