Preference-directed graph coloring

  • Authors:
  • Akira Koseki;Hideaki Komatsu;Toshio Nakatani

  • Affiliations:
  • IBM Tokyo Research Laboratory, Kanagawa-ken 242-8502, Japan;IBM Tokyo Research Laboratory, Kanagawa-ken 242-8502, Japan;IBM Tokyo Research Laboratory, Kanagawa-ken 242-8502, Japan

  • Venue:
  • PLDI '02 Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper describes a new framework of register allocation based on Chaitin-style coloring. Our focus is on maximizing the chances for live ranges to be allocated to the most preferred registers while not destroying the colorability obtained by graph simplification. Our coloring algorithm uses a graph representation of preferences called a Register Preference Graph, which helps find a good register selection. We then try to relax the register selection order created by the graph simplification. The relaxed order is defined as a partial order, represented using a graph called a Coloring Precedence Graph. Our algorithm utilizes such a partial order for the register selection instead of using the traditional simplification-driven order so that the chances of honoring the preferences are effectively increased. Experimental results show that our coloring algorithm is powerful to simultaneously handle spill decisions, register coalescing, and preference resolutions.