News for hackers. Stuff that matters.
Re:Writing a register based VM in less than 125 lines of C code by Joker_vD on Thursday December 09, 2021 @04:50AM (#29495538)
Register allocation is not that hard, especially if you don't do it via graph coloring and have more than 2 general-purpose registers available. Build SSA form, remove critical edges, spill temporaries until the number of simultaneously live temporaries is strictly less than the number of available registers, assign registers in a straightforward manner, move out of SSA (that's where that one unused register may come in handy). See [0] and its bibliography for more details.

[0] https://hal-lara.archives-ouvertes.fr/hal-02102286/file/RR20...

There are no comments on this comment yet.