Get the latest tech news

Linear scan register allocation on SSA


A linear scan through the history of… linear scan register allocation.

The result of liveness analysis is a mapping of BasicBlock -> Set[Instruction] that tells you which virtual registers (remember, since we’re in SSA, instruction==vreg) are alive (used later) at the beginning of the basic block. It’s possible to write tests that spot check sample programs of all shapes and sizes but it’s very difficult to anticipate every possible edge case that will appear in the real world. This means that a decent chunk of the time (tests, CI, maybe a production cluster) we can get a very clear signal that every register assignment that passes through the verifier satisfies some invariants.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of linear

linear

Photo of allocation

allocation

Photo of SSA

SSA

Related news:

News photo

Linear sent me down a local-first rabbit hole

News photo

Intel Continues Working On Linear Address Space Separation "LASS" For Linux

News photo

Atlassian rival Linear raises $82M at $1.25B valuation