## A combined algorithm for graph-coloring in register allocation (2002)

Venue: | Proceedings of the Computational Symposium on Graph Coloring and its Generalizations |

Citations: | 2 - 0 self |

### BibTeX

@INPROCEEDINGS{Allen02acombined,

author = {M. Allen and Giridhar Kumaran and Tong Liu},

title = {A combined algorithm for graph-coloring in register allocation},

booktitle = {Proceedings of the Computational Symposium on Graph Coloring and its Generalizations},

year = {2002},

pages = {100--111}

}

### Years of Citing Articles

### OpenURL

### Abstract

Abstract. Our research involves improved algorithms for graph-coloring, in the context of register allocation. We extend the usual algorithm, 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. For typical register-set sizes, the extended algorithm can color graphs using significantly less time and spilling significantly smaller numbers of nodes to memory than does the Chaitin algorithm; these advantages become less pronounced, as register-set size decreases, and Chaitin can offer some small measure of better performance for very small sizes. Our algorithm has some interesting additional features. On the one hand, it can be extended to the general graph-coloring problem, outside of the particular application considered. In addition, it makes available adjustable parameters for producing moreor less-optimal executables during compiler runs.

### Citations

1502 | Reducibility among combinatorial problems - Karp - 1972 |

698 | A New Method for Solving Hard Satisfiability Problems
- Selman, Levesque, et al.
- 1996
(Show Context)
Citation Context ...t, we consider altering the actual graph coloring algorithm itself. We base our work in the first place on the randomized local search algorithm Gsat, first developed by Selman, Levesque and Mitchell =-=[15]-=-. For any boolean logical expression ϕ in CNF form, Gsat begins by randomly assigning truth-values to variables, and then performs a hill-climbing search, altering one variable’s value so as to maximi... |

428 |
Register Allocation and Spilling via Graph Coloring
- Chaitin
- 1982
(Show Context)
Citation Context ...e now describe the combination of methods used in our approach. 2.1. The Chaitin algorithm. The standard algorithm for coloring graphs during register allocation was first put forth by Chaitin, et al =-=[4, 5]-=-, who first formulated register allocation as a graph-coloring problem, and put forth an algorithm originally proposed by Kempe [6]. Despite its relative simplicity, this algorithm remains the most co... |

390 | Some simplified NP -complete graph problems. Theoret - GAREY, JOHNSON, et al. - 1976 |

199 |
allocation via coloring
- Chaitin, Auslander, et al.
- 1981
(Show Context)
Citation Context ...e now describe the combination of methods used in our approach. 2.1. The Chaitin algorithm. The standard algorithm for coloring graphs during register allocation was first put forth by Chaitin, et al =-=[4, 5]-=-, who first formulated register allocation as a graph-coloring problem, and put forth an algorithm originally proposed by Kempe [6]. Despite its relative simplicity, this algorithm remains the most co... |

186 | Improvements to graph coloring register allocation
- Briggs, Cooper, et al.
- 1994
(Show Context)
Citation Context ...nto altering the algorithms used in register allocation attempts to preserve the basic Chaitin algorithm, while minimizing the cost of spills generated by that algorithm. For instance, a body of work =-=[8, 9, 10, 11, 12]-=- has concentrated upon producing new heuristics for use in the spill phase of the code, trying to make better, or more sophisticated, choices as to which nodes to spill, and when. Others attempt to co... |

141 | Register Allocation via Graph Coloring
- Briggs
- 1992
(Show Context)
Citation Context ...nto altering the algorithms used in register allocation attempts to preserve the basic Chaitin algorithm, while minimizing the cost of spills generated by that algorithm. For instance, a body of work =-=[8, 9, 10, 11, 12]-=- has concentrated upon producing new heuristics for use in the spill phase of the code, trying to make better, or more sophisticated, choices as to which nodes to spill, and when. Others attempt to co... |

135 |
Coloring heuristics for register allocation
- Briggs, Cooper, et al.
- 1989
(Show Context)
Citation Context ...nto altering the algorithms used in register allocation attempts to preserve the basic Chaitin algorithm, while minimizing the cost of spills generated by that algorithm. For instance, a body of work =-=[8, 9, 10, 11, 12]-=- has concentrated upon producing new heuristics for use in the spill phase of the code, trying to make better, or more sophisticated, choices as to which nodes to spill, and when. Others attempt to co... |

135 |
Using tabu search techniques for graph coloring
- Hertz, Werra
- 1987
(Show Context)
Citation Context ...djacency matrix of the graph itself as equivalent to same. Furthermore, this method provides something similar to another local search method used in graph-coloring investigations, namely Tabu Search =-=[16, 17]-=-, without all of the necessary overhead, and with some important differences. Whereas Tabu search retains a “taboo list” of recently visited configurations in order to avoid local maxima in the search... |

134 |
Modern Compiler Implementation in C
- Appel
(Show Context)
Citation Context ...ortion of the process, the compiler attempts to allocate registers to the compiler analyses sections of the code in order to create a series of interference graphs. As described by Appel and Ginsburg =-=[1]-=-, “Each node in the interference graph represents a temporary value; each edge (t1, t2) indicates a pair of temporaries that cannot be assigned to the same register.” So, a set of temporaries with the... |

96 | Register allocation via hierarchical graph coloring
- Callahan, Koblenz
- 1991
(Show Context)
Citation Context ...gure 1. A 2-colorable graph for which the Chaitin algorithm is guaranteed to fail. with other methods, such as live range splitting [13], or on trying to optimize the placement of inserted spill code =-=[14]-=-. While all of these possibilities have merit, we consider altering the actual graph coloring algorithm itself. We base our work in the first place on the randomized local search algorithm Gsat, first... |

66 | Spill code minimization techniques for optimizing compilers
- Bernstein, Goldin, et al.
(Show Context)
Citation Context |

34 | Iterated greedy graph coloring and the difficulty landscape
- Culberson
- 1992
(Show Context)
Citation Context ...n particular, it would be interesting to look at our performance relative to that of algorithms that combine a variety of methods similar to our own, including forms of greedy partitioning and search =-=[18]-=-. Of real interest would be the role of the randomization elements present in the Gsat-style search method, and the potential benefits to be had by way of the pruning methods introduced by the Chaitin... |

32 |
On the geographical problem of the four colors
- Kempe
(Show Context)
Citation Context ... during register allocation was first put forth by Chaitin, et al [4, 5], who first formulated register allocation as a graph-coloring problem, and put forth an algorithm originally proposed by Kempe =-=[6]-=-. Despite its relative simplicity, this algorithm remains the most commonly-used graph-coloring method for use in modern compiler technology: For any graph G and number of colors k: (1) Remove from G ... |

25 | Live range splitting in a graph coloring register allocator
- Cooper, Simpson
- 1998
(Show Context)
Citation Context ... Harvey, and Torczon [7].sGRAPH-COLORING IN REGISTER ALLOCATION 3 Figure 1. A 2-colorable graph for which the Chaitin algorithm is guaranteed to fail. with other methods, such as live range splitting =-=[13]-=-, or on trying to optimize the placement of inserted spill code [14]. While all of these possibilities have merit, we consider altering the actual graph coloring algorithm itself. We base our work in ... |

20 | Coloring register pairs
- Briggs, Cooper, et al.
- 1992
(Show Context)
Citation Context |

10 | A tutorial on tabu search
- Hertz, Taillard, et al.
- 1995
(Show Context)
Citation Context ...djacency matrix of the graph itself as equivalent to same. Furthermore, this method provides something similar to another local search method used in graph-coloring investigations, namely Tabu Search =-=[16, 17]-=-, without all of the necessary overhead, and with some important differences. Whereas Tabu search retains a “taboo list” of recently visited configurations in order to avoid local maxima in the search... |

7 | How to build an interference graph
- Cooper, Harvey, et al.
- 1998
(Show Context)
Citation Context ...ill phase of the code, trying to make better, or more sophisticated, choices as to which nodes to spill, and when. Others attempt to combine spilling 1 For discussion, see Cooper, Harvey, and Torczon =-=[7]-=-.sGRAPH-COLORING IN REGISTER ALLOCATION 3 Figure 1. A 2-colorable graph for which the Chaitin algorithm is guaranteed to fail. with other methods, such as live range splitting [13], or on trying to op... |