What is the primary goal of register allocation in code generation?
Register allocation aims to assign variables to processor registers efficiently. Since registers are much faster than memory, minimizing memory accesses by keeping frequently used variables in registers can significantly improve performance.