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 ...
Get Getting Started with LLVM Core Libraries now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.