Register allocation

Register allocation is the process of turning IR into a more platform-dependent representation by assigning hardware registers to virtual registers/variables. Normally, there exist fewer hardware registers than variables in the program, and if more registers than available have to be in use at the same time, the register allocator will have to "spill" some of them to memory (typically, the user stack). This adds execution overhead to the generated code since additional instructions are used for the spills. Optimal register allocation is a non-trivial and computationally intensive problem.

See also Spilling.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset