[CodeGen] Add MachineRegisterInfo::swapOperands
Add MachineRegisterInfo::swapOperands, similar to moveOperands, to swap
the contents of two operands of any type, updating use-def lists as
needed. Register operands keep their relative positions in use-def
lists. Each operand keeps its parent instruction and its tied-operand
status.
Also add a MachineInstr::swapOperands convenience wrapper which also
works for instructions that are not in a function.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>