A faster optimal register allocator

  • Authors:
  • Changqing Fu;Kent Wilken

  • Affiliations:
  • University of California, Davis, Davis, CA;University of California, Davis, Davis, CA

  • Venue:
  • Proceedings of the 35th annual ACM/IEEE international symposium on Microarchitecture
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

Recently researchers have proposed modeling register allocation as an integer linear programming (IP) problem and solving it optimally for general purpose processors [17, 20] and for dedicated embedded systems [23]. Compared with traditional graph-coloring approaches, the IP-based allocators can improve a program's performance. However, the solution times are much slower.This paper presents an lP-based optimal register allocator which is much faster than previous work. We present several local and global reduction techniques to identify locations in a program's control-flow graph where spill decisions and register deallocation decisions are unnecessary for optimal register allocation. We propose a hierarchical reduction approach to efficiently remove the corresponding redundant decisions and constraints from the IP model. This allocator is built into the Gnu C Compiler and is evaluated experimentally using the SPEC921NT benchmarks. The results show that the improved IP model is much simpler. The number of constraints produced is almost linear with the function size. The optimal allocation time is much faster, with a speedup factor of about 150 for hard allocation problems.