ACM SIGPLAN Notices · 1989 · 33 citations · 7 references
ComputingComputer EngineeringComputer ScienceAlgorithmsCompilersParallel AlgorithmsControl-flow AnalysisData-flow AnalysisGraph ColoringHeuristic OptimizationInstruction SchedulingRegister AllocationGlobal Register AllocationGraph Coloring Register AllocationRegister AssignmentSpilling
Global register allocation and spilling is commonly performed by solving a graph coloring problem. In this paper we present a new coherent set of heuristic methods for reducing the amount of spill code generated. This results in more efficient (and shorter) compiled code. Our approach has been compared to both standard and priority-based coloring algorithms, universally outperforming them. In our approach, we extend the capability of the existing algorithms in several ways. First, we use multiple heuristic functions to increase the likelihood that less spill code will be inserted. We have found three complementary heuristic functions which together appear to span a large proportion of good spill decisions. Second, we use a specially tuned greedy heuristic for determining the order of deleting (and hence coloring) the unconstrained vertices. Third, we have developed a “cleaning” technique which avoids some of the insertion of spill code in non-busy regions.
7
New methods to color the vertices of a graph
Daniel Brélaz · Communications of the ACM · 1979 · 1.6K citations · Full text
Register allocation & spilling via graph coloring
Gregory J. Chaitin · 1982 · 668 citations
Register allocation by priority-based coloring
Frederick Chow, John L. Hennessy · 1984 · 219 citations
Trapezoid graphs and their coloring
Ido Dagan, Martin Charles Golumbic, Ron Y. Pinter · Discrete Applied Mathematics · 1988 · 147 citations
An overview of the PL.8 compiler
Marc Auslander, Martin Hopkins · 1982 · 116 citations