What is Register allocation?

Assigning program variables and temporaries to the CPU's limited registers, ensuring values in use at the same time get different registers, often via coloring an interference graph.

Field: Compilers

Questions that mention Register allocation (3)

  1. In register allocation by coloring an interference graph, what do the nodes and edges represent?
  2. What happens to generated code when register allocation causes a "spill"?
  3. What does liveness analysis, done in preparation for register allocation, determine?

Related terms

Control-flow graph Abstract syntax tree Basic block Common subexpression elimination Constant folding Function inlining Instruction scheduling Intermediate representation JIT compilation Lexical analysis

Back to the glossary