Skip to content

Don't re-use stack slots for growing registers

sheaf requested to merge sheaf/ghc:T26668 into master

Ticket: #26668 (closed).

This MR is based on top of !15121 (closed). Look at the last commit only.

This MR avoids re-using a stack slot for a register that has grown but already had a stack slot.

For example, suppose we have stack slot assigments

  %v1 :: FF64 |-> StackSlot 0
  %v2 :: FF64 |-> StackSlot 1

Later, we start using %v1 at a larger format (e.g. F64x2) and we need to spill it again.
Then we must not use StackSlot 0, as a spill at format FF64x2 would clobber the data in StackSlot 1.

This can cause some fragmentation of the StackMap, but that's probably OK.

Merge request reports

Loading