## Evaluation of Algorithms for Local Register Allocation (1999)

### Cached

### Download Links

- [www.cs.rutgers.edu]
- [www.cs.rutgers.edu]
- [www.cs.rutgers.edu]
- [remus.rutgers.edu]
- DBLP

### Other Repositories/Bibliography

Citations: | 23 - 1 self |

### BibTeX

@MISC{Liberatore99evaluationof,

author = {Vincenzo Liberatore and Martin Farach-Colton and Ulrich Kremer},

title = {Evaluation of Algorithms for Local Register Allocation},

year = {1999}

}

### OpenURL

### Abstract

Local register allocation (LRA) assigns pseudo-registers to actual registers in a basic block so as to minimize the spill cost. In this paper, four di#erent LRA algorithms are compared with respect to the quality of their generated allocations and the execution times of the algorithms themselves. The evaluation is based on a framework that views register allocation as the combination of boundary conditions, LRA, and register assignment. Our study does not address the problem of instruction scheduling in conjunction with register allocation, and we assume that the spill cost depends only on the number and type of load and store operations, but not on their positions within the instruction stream.

### Citations

10922 |
Computers and Intractability: A Guide to the Theory of NP-Completeness
- Garey, Johnson
- 1979
(Show Context)
Citation Context ...ost. Minimizing a fixed resource is only a very indirect way to minimizing the actual spill cost. Moreover, register sufficiency (or, which is the same, graph coloring) is not only an NP-hard problem =-=[9]-=-, but also a problem that is very hard to approximate efficiently [11]. Another approach to register allocation is demand-driven register allocation [20]. Demand-driven allocation starts from an inner... |

3973 | Computer Architecture: A Quantitative Approach, 3 rd ed - Hennessy, Patterson, et al. - 2002 |

572 |
Approximation algorithms for NP-hard problems
- Hochbaum
- 1997
(Show Context)
Citation Context ...izing the actual spill cost. Moreover, register sufficiency (or, which is the same, graph coloring) is not only an NP-hard problem [9], but also a problem that is very hard to approximate efficiently =-=[11]-=-. Another approach to register allocation is demand-driven register allocation [20]. Demand-driven allocation starts from an inner loop LRA and expands it to a global allocation. Our formulation of LR... |

533 | Networks flows - Ahuja, Magnanti, et al. - 1993 |

490 |
A Study of Replacement Algorithm for a Virtual-Storage Cornputer
- Belady
- 1966
(Show Context)
Citation Context ... feature, whereas subsequent model are more complete. Belady considered a model where there are no boundary conditions, no multiple references in one instructions, and stores can be executed for free =-=[4]-=-. Subsequent work counted each load and store as a unit cost [12,13,19]. Briggs et al. give algorithms for global register allocation where each load and store from memory costs C = 2 times load immed... |

416 |
Register allocation and spilling via graph coloring
- Chaitin
- 2004
(Show Context)
Citation Context ...needed, introduce spill code, and repeat the previous step. It can be shown that the register sufficiency problem is exactly equivalent to coloring a certain graph, which is called interference graph =-=[6]-=-. Several authors put forth compelling arguments against such an approach: – Some optimizations, like in-line expansion and loop unrolling, complicate the interference graph, and good colorings become... |

172 | Improvements to graph coloring register allocation
- Briggs, Cooper, et al.
- 1994
(Show Context)
Citation Context ...at the end of a basic block. A more sophisticated boundary allocation extracts the boundary conditions from a state-of-the-art global register allocator. For example, a Chaitin-Briggs style allocator =-=[5]-=- could determine the register contents at the basic block boundaries. Once boundary conditions are fixed, any LRA that respects the boundary conditions can be used. In this paper, an optimum algorithm... |

171 |
The Travelling Salesman Problem and Minimum Spanning Trees, Part II
- Held, Karp
- 1971
(Show Context)
Citation Context ...al registersassignment [16]. Lagrangian relaxation was proposed by the mathematician Lagrange in the context of non-linear optimization, and was introduced into discrete optimization by Held and Karp =-=[10]-=-. The gist of Lagrangian relaxation is that, given a complicate problem with many types of constraints, hard constraints should be moved into the objective function so that the remaining problem is ea... |

104 | The generation of optimal code for arithmetic expressions - Sethi, Ullman - 1970 |

61 | A Novel Framework of Register Allocation for Software Pipelining - Ning, Gao - 1993 |

57 | Software pipelining showdown: optimal vs. heuristic methods in a production compiler - Ruttenberg, Gao, et al. - 1996 |

56 | C.: A register allocation framework based on hierarchical cyclic interval graphs - Hendren, Gao, et al. - 1992 |

46 | Priority queues: Small, monotone and trans-dichotomous - Raman |

39 |
The history of FORTRAN
- Backus
- 1981
(Show Context)
Citation Context ...ree-phase approach. A few heuristics have been proposed for LRA. The oldest is Belady’s FurthestFirst (FF): if no register is empty, evict the pseudo-register that is requested furthest in the future =-=[2]-=-. FF is optimum in the simple Belady’s model, which assumes that stores are executed at no cost and that there are no boundary conditions [12]. FF is also optimum when there are multiple references in... |

37 | Object code optimization - Lorry, Medlock - 1969 |

27 |
Index register allocation
- Horwitz, Karp, et al.
- 1966
(Show Context)
Citation Context ...sidered a model where there are no boundary conditions, no multiple references in one instructions, and stores can be executed for free [4]. Subsequent work counted each load and store as a unit cost =-=[12,13,19]-=-. Briggs et al. give algorithms for global register allocation where each load and store from memory costs C = 2 times load immediates or any other operations [5]. Such cost model allows us to keep tr... |

20 | Crafting a Compiler, Benjamin/Cummings, Menlo Park - Fischer, Blanc - 1988 |

16 |
On local register allocation
- Farach-Colton, Liberatore
(Show Context)
Citation Context ...lem would be polynomially solvable even in the presence of different load costs, boundary conditions, and multiple references, but LRA is NP-hard as soon as stores are counted as having positive cost =-=[7]-=-. In conclusion, the hardness of LRA is due to the presence of store operations and not on several other features mentioned above. We define boundary allocation as a functional restriction of global a... |

14 | Simple register spilling in a retargetable compiler - Fraser, Hanson - 1992 |

13 | Minimum cost interprocedural register allocation,” Symp
- Kurlander, Fischer
- 1996
(Show Context)
Citation Context ... the case in our benchmarks. Integer programming is useful for several hard compilation problems; see [15] for a survey. Network flow techniques have been used for intraprocedural registersassignment =-=[16]-=-. Lagrangian relaxation was proposed by the mathematician Lagrange in the context of non-linear optimization, and was introduced into discrete optimization by Held and Karp [10]. The gist of Lagrangia... |

11 | On compiling algorithms for arithmetic expressions - Nakata - 1967 |

11 | On local register allocation - Farach, Liberatore - 1998 |

9 | Optimal and near-optimal solutions for hard compilation problems
- Kremer
- 1997
(Show Context)
Citation Context ...ger programming formulations for optimal solutions of NP-hard compiler problems has been discussed by a few researchers, in particular in the context of evaluating thesquality of heuristic approaches =-=[15,21]-=-. In addition to the optimal algorithm, we also propose a new heuristic, called MIX, for the same problem. MIX takes polynomial time, returned allocations that were always within 1% of the optimum, an... |

8 |
Register assignment algorithm for generation of highly optimized code
- Beatty
- 1974
(Show Context)
Citation Context ...l allocation by simply replacing its local portion. To the best of our knowledge, register allocation and register assignment have been considered as two distinct phases in all previous papers on LRA =-=[3,12,13,19]-=-. Register allocation is more manageable if it is divided into allocation and assignment. Register assignment could conceivably cause the introduction of a large number of register swap operations. Ac... |

6 | Demand-driven register allocation
- Proebsting, Fischer
- 1996
(Show Context)
Citation Context ...local register allocation heuristics with any global framework (e.g. Chaitin-Briggs), and (3) it isolates the register assignment phase, which was found to be the easiest phase of register allocation =-=[20]-=-. The canonical boundary allocation assumes that registers are empty at the beginning and at the end of a basic block. A more sophisticated boundary allocation extracts the boundary conditions from a ... |

5 | Improvements to graph coloring register allocation. ACM transactions on programming languages and systems - Briggs, Cooper, et al. - 1994 |

5 | Index register allocation in straight line code and simple loops - Kennedy - 1972 |

5 |
A comment on index register allocation
- Luccio
- 1967
(Show Context)
Citation Context ...sidered a model where there are no boundary conditions, no multiple references in one instructions, and stores can be executed for free [4]. Subsequent work counted each load and store as a unit cost =-=[12,13,19]-=-. Briggs et al. give algorithms for global register allocation where each load and store from memory costs C = 2 times load immediates or any other operations [5]. Such cost model allows us to keep tr... |

3 |
On the minimization of load/stores in local register allocation
- Hsu, Fischer, et al.
- 1989
(Show Context)
Citation Context ...nd loop unrolling, complicate the interference graph, and good colorings become hard to find. Hence, the solution to the register sufficiency problem will likely exceed the number of actual registers =-=[13]-=-. – As soon as the the number of registers is exceeded, then spill code must be inserted. Unfortunately, it is hard to decide which pseudo-registers to spill and where to insert spill code [13]. – Col... |

1 | The history of FORTRAN - Aho, Sethi, et al. - 1986 |

1 | the Association for Computing Machinery - Hsu, Fischer, et al. - 1966 |

1 | Uniform multipaging reduces to paging
- Liberatore
- 1998
(Show Context)
Citation Context ...timum in the simple Belady’s model, which assumes that stores are executed at no cost and that there are no boundary conditions [12]. FF is also optimum when there are multiple references in one step =-=[17]-=-, and is a 2C-approximation algorithm for LRA even in the presence of paid stores and boundary conditions [7]. If stores have a positive cost, FF is not necessarily optimal : Figure 2 gives an FF allo... |