# Register allocation & spilling via graph coloring

@inproceedings{Chaitin1982RegisterA, title={Register allocation \& spilling via graph coloring}, author={Gregory J. Chaitin}, booktitle={SIGPLAN Conferences and Workshops}, year={1982} }

In a previous paper we reported the successful use of graph coloring techniques for doing global register allocation in an experimental PL/I optimizing compiler. When the compiler cannot color the register conflict graph with a number of colors equal to the number of available machine registers, it must add code to spill and reload registers to and from storage. Previously the compiler produced spill code whose quality sometimes left much to be desired, and the ad hoe techniques used took…

## 608 Citations

### 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.

### 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.

### Optimal Register Allocation in Polynomial Time

- Computer Science, EconomicsCC
- 2013

A graph-coloring register allocator that optimally allocates registers for structured programs in polynomial time is presented and works for such a huge class of programs.

### Live Range Splitting in a Graph Coloring Register Allocator

- EconomicsCC
- 1998

A passive form of live range splitting that uses splitting as an alternative to spilling and can be coupled with Bergner's to create an allocator that makes a cost-based choice between splitting, interference region spilling, and spilling completely for each spilled live range.

### Fine-Grain Register Allocation Based on a Global Spill Costs Analysis

- EconomicsSCOPES
- 2003

A new register allocation technique is proposed that improves the efficiency by using information about the flow of variable references of a program by performing register allocation at every reference of a variable in the order of the variable reference flow.

### An improved approach of register allocation via graph coloring

- Computer ScienceIS&T/SPIE Electronic Imaging
- 2005

By abstracting register allocation to graph coloring, the allocation process is simplified and the resource of register can be used more effectively and the cost of memory access can be reduced greatly.

### Register Allocation Based on a Reference Flow Analysis

- Computer Science, EconomicsAPLAS
- 2003

This paper proposes two variations of the register allocation proposed in [13] that reduces computation time by employing a simplified graph-coloring algorithm for variable register allocation and generates more efficient code with aggressive variable flow analysis demanding a large amount of computation.

### 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.

### 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.

## References

SHOWING 1-5 OF 5 REFERENCES

### Optimization of range checking

- Computer ScienceSIGPLAN '82
- 1982

An analysis is given for optimizing run-time range checks in regions of high execution frequency using strength reduction, code motion and common subexpression elimination.

### The 801 minicomputer

- Computer ScienceASPLOS I
- 1982

An overview of an experimental system developed at the IBM T. J. Watson Research Center that consists of a running hardware prototype, a control program and an optimizing compiler, which features a primitive instruction set which can be completely hard-wired.