skip to main content
A global look-ahead register allocator
Publisher:
  • University of Wyoming
  • P.O. Box 3413 Laramie, WY
  • United States
Order Number:UMI Order No. GAX96-30631
Bibliometrics
Skip Abstract Section
Abstract

Register allocation for optimizing compilers is one of the single most valuable optimizations to perform. Most current allocators utilize a register coloring algorithm. They use many varied heuristics to decide which live ranges to break and where to break them when the number of variables exceeds the number of available registers. Such algorithms tend to average out a variable's use over its live range. This can lead to register decisions which are not sensitive to local code's needs.

A prototype global look-ahead register allocator (GLORIA) has been built which avoids the register coloring paradigm and its averaging. Allocation decisions are made for each instruction based on the distances to the next uses of live variables. Problems arise at join points where inconsistencies in allocating different paths can lead to spill code. Similar inconsistencies arise for loops where register assignments at the head and tail of the loop do not agree. GLORIA deals with such problems by preprocessing such areas and providing hints for the subsequent allocation. This allocator currently works only at the subprogram level and does not perform any interprocedural optimization.

Comparisons between GLORIA and a register coloring allocator in the MIPS Pascal compiler have been made. Preliminary results indicate that look-ahead usually performs better. Memory use is on the order of the size of the program while time use is usually the same order but could increase to the cube of the size in the worst case. The prototype needs to be extended to fully handle general programs and more testing with larger programs is required.

Contributors
  • SUNY Brockport

Index Terms

  1. A global look-ahead register allocator

    Recommendations