Fix linear register allocator bug involving read/write to same registers.
When we read a temporary value from memory, we should update its
assignment to be both in memory and in register. This was only
occurring when there was a free register, but not if we needed
to spill an existing value in a register to the stack. I generalized
the code for this case and applied it to the other two cases where
this occurs (spilled value is in memory and in a register, and when
the spilled value is only in a register.)
Furthermore, I tightened the invariants on allocRegsAndSpill_spill
with a new data type SpillLoc that captures more precisely than
Maybe Loc the possible locations we are spilling from.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>