# Improvements to graph coloring register allocation

@article{Briggs1994ImprovementsTG, title={Improvements to graph coloring register allocation}, author={Preston Briggs and Keith D. Cooper and Linda Torczon}, journal={ACM Trans. Program. Lang. Syst.}, year={1994}, volume={16}, pages={428-455} }

We describe two improvements to Chaitin-style graph coloring register allocators. The first, optimistic coloring, uses a stronger heuristic to find a k-coloring for the interference graph. The second extends Chaitin's treatment of rematerialization to handle a larger class of values. These techniques are complementary. Optimistic coloring decreases the number of procedures that require spill code and reduces the amount of spill code when spilling is unavoidable. Rematerialization lowers the…

## 409 Citations

### Graph-coloring and treescan register allocation using repairing

- Computer Science2011 Proceedings of the 14th International Conference on Compilers, Architectures and Synthesis for Embedded Systems (CASES)
- 2011

A decoupled approach that first lowers the register pressure by spilling variables, and then performs live ranges splitting/coalescing /coloring in a separate phase enables the design of simpler, cleaner, and more efficient register allocators.

### Approaches to Enhance Graph Coloring Register Allocation

- Computer Science
- 1998

Three improvements to Chaitin-style graph coloring register allocators are described and some possibilities to perform program transformation to reduce live ranges of variables thus giving them more opportunities to be allocated some registers are proposed.

### A COMBINED ALGORITHM FOR GRAPH-COLORING IN REGISTER ALLOCATION

- Computer Science
- 2002

The usual algorithm for graph-coloring is extended, first proposed by Chaitin, adding two further routines, one a form of semi-randomized greedy allocation of colors, and the second using local search with random restarts, a method developed in the context of logical satisfiability problems.

### An Analysis of Graph Coloring Register Allocation

- Computer Science
- 2006

It is found that using an optimal coloring algorithm has surprisingly little benefit and empirically demonstrate the benefit of the various extensions.

### Preference-directed graph coloring

- Computer SciencePLDI '02
- 2002

A new framework of register allocation based on Chaitin-style coloring is described, focused on maximizing the chances for live ranges to be allocated to the most preferred registers while not destroying the colorability obtained by graph simplification.

### Decoupled graph-coloring register allocation with hierarchical aliasing

- Computer ScienceSCOPES
- 2011

The semi-elementary form is introduced, a program representation that brings decoupled register allocation to architectures with register aliasing, and reduces the number of copies that traditional allocators insert into assembly programs.

### Tailoring graph-coloring register allocation for runtime compilation

- Computer ScienceInternational Symposium on Code Generation and Optimization (CGO'06)
- 2006

This paper presents a graph-coloring register allocator that has been redesigned for runtime compilation that requires considerably less allocation time and produces allocations that are only marginally worse than those of Chaitin-Briggs.

### Build Simplify Potential Spill Select Actual Spill Coloring Heuristic

- Computer Science
- 2005

By replacing the coloring phase of the gcc compiler’s register allocator with an optimal coloring algorithm, this paper demonstrates both the importance of extending the graph coloring model to better express the costs of allocation decisions and the unsuitability of a puregraph coloring model of register allocation.

### Register Allocation with Graph Coloring by Ant Colony Optimization

- Computer Science2011 30th International Conference of the Chilean Computer Science Society
- 2011

A new algorithm for intraprocedural register allocation called CA-RT-RA is described, an algorithm that extends a classic graph coloring register allocator to use the authors' graph coloring algorithm Color Ant-RT and is able to minimize the amount of spills.

### Iterated register coalescing

- Computer ScienceTOPL
- 1996

This work shows how to interleave coloring reductions with Briggs's coalescing heuristic, leading to an algorithm that is safe but much more aggressive.

## References

SHOWING 1-10 OF 48 REFERENCES

### Spill code minimization techniques for optimizing compliers

- Computer SciencePLDI '89
- 1989

This paper presents a new coherent set of heuristic methods for reducing the amount of spill code generated, which results in more efficient (and shorter) compiled code.

### The priority-based coloring approach to register allocation

- Computer ScienceTOPL
- 1990

The detailed algorithms for a priority-based coloring approach are presented and are contrasted with the basic graph-coloring algorithm and various extensions to the basic algorithms are also presented.

### Coloring register pairs

- Computer ScienceLOPL
- 1992

This paper discusses the representation of register pairs in a graph coloring allocator, and explains the problems that arise with Chaitin's allocator and shows how the optimistic allocator avoids them.

### Register Allocation via Hierarchical Graph Coloring

- Computer Science
- 1996

It is shown that when register pressure is high, Callahan and Koblenz’s method generates worse code than Briggs’ method -the generally accepted method of graph coloring register allocation.

### Register allocation by priority-based coloring

- BusinessSIGPLAN '84
- 1984

The results confirm that, using priority-based coloring, global register allocation can be performed practically and efficiently.

### Register allocation via graph coloring

- Computer Science
- 1981

The basic idea behind register allocation via graph coloring is to reduce register spillage by globally assigning variables to registers across an entire program module via the five basic steps…

### Register allocation in the SPUR Lisp compiler

- Computer ScienceSIGPLAN '86
- 1986

The allocator successfully assigned most temporaries and local variables to registers in a wide variety of functions and its execution cost is moderate.

### Graph coloring register allocation for processors with multi-register operands

- Computer SciencePLDI '90
- 1990

A suitable generalization of graph coloring algorithms for processor architectures in which some instructions refer to individual operands that are comprised of multiple registers is presented.