Register allocation for optimal loop scheduling

  • Authors:
  • Qi Ning

  • Affiliations:
  • Centre de Recherche Informatique de Montreal, Montreal, Quebec

  • Venue:
  • CASCON '93 Proceedings of the 1993 conference of the Centre for Advanced Studies on Collaborative research: distributed computing - Volume 2
  • Year:
  • 1993

Quantified Score

Hi-index 0.00

Visualization

Abstract

One of the major challenges in designing optimizing compilers, especially for scientific computation, is to take advantage of the parallelism in loops in order to obtain maximum speedup on parallel computer architectures. Optimal loop scheduling is therefore one of the most important topics studied by many computer scientists. However, how to allocate a minimum number of registers to support optimal loop scheduling for parallel architectures is less understood. In this report, we propose a simultaneous scheduling and register allocation approach for a parallelizing compiler. We have proved that the general problem of finding such an optimal scheduling together with register allocation is NP-complete. Then we propose a practical approach to divide the register allocation problem into two steps. The first step solves a minimum buffer allocation problem, which will find a time-optimal periodic schedule using a minimum number of buffers. We give a polynomial time algorithm to solve this problem. The second step analyzes the live ranges of the variables and uses coloring algorithms to reduce the register requirement by sharing. The algorithm has been implemented and used to test selected loops in benchmark programs. Testing results are reported.