Register Assignment in Tree-Sm Prog~~
William W. Agresti · 1979
Much complex decision-making is performed routinely by the software of a computer system. It is appropriate to study more thoroughly the performance of this built-in decision-making, because it can strongly influence the efficiency of the entire system. One objective of compilers is to produce a reasonably efficient machine-language v rsion of a user’s program. Traditionally, one of the best opportunities for improving the compiler-produced machine-language program has been in devising efficient policies for assigning quantities to the computer’s registers. The programs of interest here involve flow of control which can be represented by a tree structure. The problem of assigning index registers in such programs is formulated as a (nonserial) disc-Prolog problem. Following the resulting recursion equations leads to a pohcy which the compiler could follow to minimize costs. The policy decisions specify those steps in the program where particular quantities hould be loaded or stored into registers. An example involving a brancbing program is solved by this method. A host of resource allocation problems are found in the operation of computer systems. Much of the decision-making in such environments is automated as part of the system software. Operating systems, for example, regularly manage the resources of the computer-conse~g memory, exploit-ing parallelism wherever possible, and scheduling the processors for high utilization. Compilers, as well, contain a wealth of decision-making apparatus which is routinely exercised as part of the process of translating user programs into machine language. Because of the high usage of such software, the quality of this built-in decision-making can strongly influence the efficiency of the entire system. Underlying the present study is the belief that some of the complex decision-making that is automated in computer software can benefit from more thorough analysis. This observation is certainly not new. Perhaps the