Instruction scheduling and register allocation are two very important optimizations in modern compilers for advanced processors. These two optimizations must be performed simultaneously in order to maximize the instruction-level parallelism and to fully utilize the registers 11]. In this paper we solve register allocation and instruction scheduling simultaneously using integer linear programming (ILP). We have successfully worked out the ILP formulations for the problem with and without register spilling. Two kinds of optimizations are considered: (1) Fix the number of free registers and then solve for the minimum number of cycles to execute the instructions, or (2) x the maximum execution cycles for the instructions and solve for the minimum number of registers needed. Besides being theoretically interesting, our solution serves as a reference point for other heuristic solutions. The formulations are also applicable to high-level synthesis of ASICs and designs for embedded processors. In these application domains, the code quality is more important than the compilation time.
ILP-based simultaneous instruction scheduling and register allocation for multiissue machines is proposed in REF .
Using Integer Linear Programming for Instruction Scheduling and Register Allocation in Multi-issue Processors
in Multi-Issue Processors. Computers and Mathematics with Applications
Computer Science