regalloc.rs icon indicating copy to clipboard operation
regalloc.rs copied to clipboard

Saving/restoring callee-saved regs

Open bnjbvr opened this issue 6 years ago • 1 comments

From an email from @julian-seward1 :

Is there any mileage in the idea of
implementing save/restore of callee saves regs by simply copying them all into
new virtual regs in the prologue and copying them back in the epilogue?  Then
the RA's spilling mechanism will naturally push them to the stack as required.

If we also also told the RA that the associated VRegs have a tiny spill cost
then we'd be pretty sure that these values get "spilled" before any others.

bnjbvr avatar Jan 16 '20 12:01 bnjbvr