This patch adds special handling to detect the case where we try to
assign a register to the VReg use of a copy, but all registers in the
required class are pre-assigned. We cannot assign such registers and
error out later.
Instead, we can try to move the use right after the definition, in the
hope that one of the registers in the class gets freed up.
This scenario can happen when assigning registers to copies to physical
registers for a function call, so initially this is limited to copies to
physical registers.
The only extra cost in practice should be the scan of the register
class. Finding the defining MI should only be needed in cases where we
would run out of registers otherwise.
I am planning to convert the test case into a MIR test case, but I'd
like to make sure the patch is on the right track first.
I don't see why copies specifically would be special for this problem