logoalt Hacker News

leonidasrup • today at 11:16 AM • 0 replies • view on HN

No compiler does optimal register allocation, because optimal register allocation is an NP-complete problem.

Chaitin et al.: "Register allocation via coloring".

https://en.wikipedia.org/wiki/Register_allocation