Post #1529880
2026-04-22 16:39 UTC
Grr. I really should just do simple linear scan register allocation with the dumb pass-everything-on-the-stack ABI to start with, but I keep trying to map out how "do it right" with a more realistic pass-by-registers ABI, etc.
The desire to solve the whole problem "for real" is fighting with the desire to get a basic implementation working first.
Ideally I'd leave things in the argument registers as long as possible *and* avoid spilling to the stack around function calls...
#Compiler #PLdev
Replies (1)
-
@joe@f.duriansoftware.com 2026-04-22 16:42
@swetland@chaos.social dunno if you saw laurie tratt's recent post about his yk jit, but in his blog post he notes that his code generator (as well as LuaJIT's) do pretty well with register allocation by backwards code generation, without getting into too fancy of algorithms https://tratt.net/laurie/blog/2026/retrofitting_jit_compilers_into_c_interpreters.html