Fix linear register allocator bug involving read/write to same registers.
authorEdward Z. Yang <ezyang@mit.edu>
Mon, 4 Apr 2011 11:58:31 +0000 (12:58 +0100)
committerEdward Z. Yang <ezyang@mit.edu>
Tue, 5 Apr 2011 10:29:33 +0000 (11:29 +0100)
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>


No differences found