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… 

Figures and Tables from this paper

Graph-coloring and treescan register allocation using repairing

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

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

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

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

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

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

  • K. CooperA. Dasgupta
  • Computer Science
    International 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

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

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

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

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

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

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

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 Via Coloring

Register allocation by priority-based coloring

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

Register allocation via graph coloring

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

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

A methodology for the real world

Graph coloring register allocation for processors with multi-register operands

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.