Hacker News new | ask | show | jobs
by felixangell1024 3655 days ago
Depends what you compile to. Writing a register allocator may be a little tricky (if you compile to a VM/Assembly/..), though if you compile to something like C, it's very easy. LLVM is another alternative which is also relatively simple to learn.
2 comments

Spilling every variable to memory isn't too bad if you just want it to work and aren't worried about performance.
Linear scan register allocation is "good enough" in most cases and it is trivial if you're doing it on top of an SSA.