Spill code minimization techniques for optimizing compliers
D. Bernstein, Martin Charles Golumbic, Yishay Mansour et al. · ACM SIGPLAN Notices · 1989
Global register allocation and spilling is commonly performed by solving a graph coloring problem. In this paper we present a new coherent set of heuristic methods for reducing the amount of spill code generated. This results in more efficient (and shorter) compiled code. Our approach has been compared to both standard and priority-based coloring algorithms, universally outperforming them. In our approach, we extend the capability of the existing algorithms in several ways. First, we use multiple heuristic functions to increase the likelihood that less spill code will be inserted. We have found three complementary heuristic functions which together appear to span a large proportion of good spill decisions. Second, we use a specially tuned greedy heuristic for determining the order of deleting (and hence coloring) the unconstrained vertices. Third, we have developed a “cleaning” technique which avoids some of the insertion of spill code in non-busy regions.
Cited by 33 works. doi:10.1145/74818.74841 Open-access PDF
Authors
References
- Register allocation & spilling via graph coloring
- Graph Theory and Computing
- Algorithmic Graph Theory and Perfect Graphs
- New methods to color the vertices of a graph
- An overview of the PL.8 compiler
- Global register allocation at link time
- Register allocation by priority-based coloring
- Trapezoid graphs and their coloring
- Register allocation in the SPUR Lisp compiler