Register allocation
The basic task of the register allocation is to transform an endless number of virtual registers into physical (limited) ones. Since targets have a limited number of physical registers, some virtual registers are assigned to memory locations, the spill slots. Yet, some MI code fragments may already be using physical registers even before register allocation. This happens for machine instructions that need to use a specific register to write their result or because of an ABI requirement. For these cases, the register allocator respects this previous allocation and work to assign other physical registers to the remaining virtual registers.
Another important role of the LLVM register allocator is to deconstruct the SSA form of ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access