Using node merging to enhance graph coloring

  • Authors:
  • Steven R. Vegdahl

  • Affiliations:
  • University of Portland, 5000 N. Willamette Blvd., Portland, OR

  • Venue:
  • Proceedings of the ACM SIGPLAN 1999 conference on Programming language design and implementation
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

A Chaitin-style register allocator often blocks during its simplification phase because no node in the interference graph has a degree that is sufficiently small. Typically, this is handled by node-splitting, or by optimistically continuing---and hoping that a legal N-coloring will still be found. We observe that the merging of two nodes in a graph causes a reduction in the degree of any node that had been adjacent to both. We have enhanced Chaitin's coloring algorithm so that it attempts node-merging during graph simplification; this often allows simplification to continue, while still guaranteeing a coloring for the graph. We have tested this algorithm using Appel's database of register-coloring graphs, and have compared it with Chaitin's algorithm. The merge-enhanced algorithm yields a better coloring about 8% of the time, and a worse coloring less than 0.1% of the time.