ABSTRACT

An important part of code generation is to decide which values in a program reside in a register (register allocation) and in what register (register assignment). The values may include temporary variables introduced in the compilation process. The two aspects are often taken together and loosely referred to as register allocation. Some algorithms [2, 17] have an explicit separate phase for assignment whereas some combine both [49]; many combine both along with a separate assignment phase also [18, 52]. The fundamental problem to be solved is either the optimal reuse of a limited number of registers or the minimization of traffic to and from memory.