## Minimum Cost Interprocedural Register Allocation (1996)

Venue: | In Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages |

Citations: | 13 - 1 self |

### BibTeX

@INPROCEEDINGS{Kurlander96minimumcost,

author = {Steven M. Kurlander and Charles N. Fischer},

title = {Minimum Cost Interprocedural Register Allocation},

booktitle = {In Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages},

year = {1996},

pages = {230--241},

publisher = {ACM Press}

}

### Years of Citing Articles

### OpenURL

### Abstract

Past register allocators have applied heuristics to allocate registers at the local, global, and interprocedural levels. This paper presents a polynomial time interprocedural register allocator that models the cost of allocating registers to procedures and spilling registers across calls. To find the minimum cost allocation, our allocator maps solutions from a dual network flow problem that can be solved in polynomial time. Experiments show that our interprocedural register allocator can yield significant improvements in execution time. 1 Introduction Effectively using registers can significantly decrease the execution time of a program. Common policy in current compilers using only intraprocedural register allocation is to spill at call sites registers that might be used by both the caller and callee[CHKW86]. The goal of interprocedural register allocation is to minimize execution time given the register requirements of individual procedures in a program. Based on these requirements...

### Citations

433 | Register allocation and spilling via graph coloring - Chaitin - 1982 |

288 | Optimally profiling and tracing programs
- Ball, Larus
- 1992
(Show Context)
Citation Context ...e to each routine. We use profile information to compute the number of calls between each procedure and the number of instructions executed in each procedure. Profile information is gathered using qpt=-=[BL92]-=-. When profiling, benchmarks are run on input yielding short execution times, except for benchmarksnasa7 , in which we have only one input file. Since the profiled code is compiled using only an intra... |

135 |
Coloring Heuristics for Register Allocation
- Briggs, Cooper, et al.
- 1989
(Show Context)
Citation Context ...approach can be used with conventional compilers that translate one procedure at a time. Each procedure may be translated using any of the well-known, high-quality, intraprocedural register allocators=-=[BCKT89]-=-[CK91][PF92]. Then using profile information our minimum cost interprocedural register allocator determines how many registers each procedure will be given and where spills will be placed. A minimum c... |

121 | A faster strongly polynomial minimum cost flow algorithm
- Orlin
- 1988
(Show Context)
Citation Context ...problem, in which there are O(p) nodes and O(p 2 ) arcs. Letting n be the number of nodes and m be the number of arcs, an unconstrained minimum cost flow problem can be solved in O(n log n(m+n log n) =-=[Orl93]-=-, which is independent of k, w j , and s j in our dual minimum cost flow problem. The complexity of solving our minimum cost flow problem is, therefore, O((p log p (p 2 + p log p)), which is O(p 3 log... |

96 | Register allocation via hierarchical graph coloring
- Callahan, Koblenz
- 1991
(Show Context)
Citation Context ... can be used with conventional compilers that translate one procedure at a time. Each procedure may be translated using any of the well-known, high-quality, intraprocedural register allocators[BCKT89]=-=[CK91]-=-[PF92]. Then using profile information our minimum cost interprocedural register allocator determines how many registers each procedure will be given and where spills will be placed. A minimum cost in... |

80 |
Using and Porting
- Stallman
- 1991
(Show Context)
Citation Context ...ay not be allocated a register because of an insufficient number of callee-save registers. To accurately determine the number of references to registers that can be live across a call, we modified gcc=-=[Sta93]-=- to return the number of register references assuming the non-work registers are callee-save. We let the general-purpose registers that are non-work registers represent candidates in our interprocedur... |

38 |
Probalistic register allocation
- Proebsting, Fischer
- 1992
(Show Context)
Citation Context ...e used with conventional compilers that translate one procedure at a time. Each procedure may be translated using any of the well-known, high-quality, intraprocedural register allocators[BCKT89][CK91]=-=[PF92]-=-. Then using profile information our minimum cost interprocedural register allocator determines how many registers each procedure will be given and where spills will be placed. A minimum cost interpro... |

33 |
Global Register Allocation at Link-Time
- Wall
- 1970
(Show Context)
Citation Context ... registers as well as to choose which registers to use (the registers selected need not always be caller-save). 2 Related Work Past interprocedural register allocators have relied on heuristics. Wall =-=[Wal86]-=- observes that two procedures that are not simultaneously active can share the same registers for their locals. With this in mind, Wall groups locals that can be 1 Cameron refers to the dual minimum c... |

32 |
Register Allocation Across Procedure and Module Boundaries
- Santhanam, Odnert
- 1990
(Show Context)
Citation Context ... register spilling around calls in frequently executed procedures near the top of a call graph. The approach we propose avoids register spilling across frequently executed calls. Santhanam and Odnert =-=[SO90]-=- perform interprocedural register allocation over clusters of frequently executed procedures. Their heuristic aims to move spill code to the root node of a cluster. The approach we propose examines th... |

30 |
A Simple Interprocedural Register Allocation Algorithm and its Effectiveness for
- Steenkiste, Hennessy
- 1989
(Show Context)
Citation Context ... allocator may not find the best allocation with respect to his model, since he allows locals infrequently referenced to be grouped together with locals frequently referenced. Steenkiste and Hennessy =-=[SH89]-=- design an interprocedural register allocator for LISP programs. Their approach allocates registers to locals in a bottom-up fashion over the call graph. Since they find that LISP programs tend to spe... |

10 |
Engineering a RISC compiler system
- CHOW, HIMELSTEIN, et al.
- 1986
(Show Context)
Citation Context ... the execution time of a program. Common policy in current compilers using only intraprocedural register allocation is to spill at call sites registers that might be used by both the caller and callee=-=[CHKW86]-=-. The goal of interprocedural register allocation is to minimize execution time given the register requirements of individual procedures in a program. Based on these requirements, an interprocedural r... |

3 |
Private communication
- Zakarian
- 1995
(Show Context)
Citation Context ...terprocedural register allocation with spills, the problem is transformed into a minimum cost flow problem. Solutions to the minimum cost flow problem are found using the primal network simplex method=-=[Zak95]-=-. Though the primal network simplex method is exponential in the worst case, we found it faster in practice than a polynomial time dual network simplex algorithm available to us. Figure 11 shows the p... |

2 |
Antichain sequences
- Cameron
- 1985
(Show Context)
Citation Context ...call graph when profitable. To generate a save-free interprocedural register allocation of a call graph, we use Cameron's algorithm for finding a maximum weight k-antichain in a partially ordered set =-=[Cam85]-=-. To find a maximum weight k-antichain, Cameron maps solutions from a dual minimum cost flow problem 1 . A dual minimum cost flow problem can be transformed into a minimum cost flow problem and solved... |

1 |
Interprocedural Register Allocation
- Kurlander
- 1995
(Show Context)
Citation Context ...rtial order (v), and given k registers, let P (k; G) be solutions to the dual minimum cost flow problem of Figure 7. Let Q (k; G) be solutions to interprocedural register allocation with spilling. In =-=[Kur95]-=-, we prove that there exists a bijection z(I), from I 2 Q (k; G) onto z 2 P (k; G), and an inverse function I(z) for z 2 P (k; G). I(z) is defined below. ffl I(z) = (R(z), free in(z), free out(z)). ff... |