## Extended Linear Scan: an Alternate Foundation for Global Register Allocation

Citations: | 13 - 0 self |

### BibTeX

@MISC{Sarkar_extendedlinear,

author = {Vivek Sarkar and Rajkishore Barik},

title = {Extended Linear Scan: an Alternate Foundation for Global Register Allocation},

year = {}

}

### OpenURL

### Abstract

Abstract. In this paper, we extend past work on Linear Scan register allocation, and propose two Extended Linear Scan (ELS) algorithms that retain the compiletime efficiency of past Linear Scan algorithms while delivering performance that can match or surpass that of Graph Coloring. Specifically, this paper makes the following contributions: – We highlight three fundamental theoretical limitations in using Graph Coloring as a foundation for global register allocation, and introduce a basic Extended Linear Scan algorithm, ELS0, which addresses all three limitations for the problem of Spill-Free Register Allocation. – We introduce the ELS1 algorithm which extends ELS0 to obtain a greedy algorithm for the problem of Register Allocation with Total Spills. – Finally, we present experimental results to compare the Graph Coloring and Extended Linear Scan algorithms. Our results show that the compile-time speedups for ELS1 relative to GC were significant, and varied from 15 × to 68×. In addition, the resulting execution time improved by up to 5.8%, with an average improvement of 2.3%. Together, these results show that Extended Linear Scan is promising as an alternate foundation for global register allocation, compared to Graph Coloring, due to its compile-time scalability without loss of execution time performance. 1

### Citations

1034 |
Advanced Compiler Design and Implementation
- Muchnick
- 1997
(Show Context)
Citation Context ...r Assignment) contribute at most O(|I |) time. �. 4 Experimental Results In this section, we report on experimental results obtained from a prototype implementation of Graph Coloring (as described in =-=[10]-=-) and ELS1 in version 4.1 of the gcc compiler using the -O3 option. Compile-time and execution time were measured on a POWER5 processor running at 1.9GHz with 31.7GB of real memory running AIX 5.3. Ex... |

433 |
Register allocation and spilling via graph coloring
- Chaitin
- 1982
(Show Context)
Citation Context ...portant optimizations performed by compilers for high-level programming languages, and the algorithms used for register allocation have matured accordingly. Starting with the seminal paper by Chaitin =-=[5]-=-, the dominant approaches for global register allocation have been based on the idea of building an Interference Graph (IG) for variables in a procedure, and employing Graph Coloring (GC) heuristics t... |

147 | Iterated register coalescing - George, Appel - 1996 |

144 | Register Allocation via Graph Coloring
- Briggs
- 1992
(Show Context)
Citation Context ...olution to the SFRA problem includes a register move instruction in the loop, but a solution based on Graph Coloring instead inserts a spill instruction in the loop. It is of course well known (e.g., =-=[2]-=-) that renaming of variables or live-range splitting can be performed to obtain spill-free solutions with Graph Coloring for the examples in Figure 2. The observation being made here is that these tra... |

134 | Linear Scan Register Allocation
- Poletto, Sarkar
- 1999
(Show Context)
Citation Context ...it prohibitive to use Graph Coloring for register allocation in just-in-time and dynamic compilers, where compile-time overhead contributes directly to run-time. Recent work on Linear Scan algorithms =-=[14, 16]-=- has led to more efficient algorithms for global register allocation that use data structures with size that is linear in the number of variables. The results reported thus far suggest that Linear Sca... |

105 |
Integrating register allocation and instruction scheduling for RISCs. Architectural Support for Programming Languagesand Operating Systems (ASPLOS
- Bradlee, Eggers, et al.
(Show Context)
Citation Context ...s of instruction ik are written. Second, we assume that register allocation is performed as a separate pass from instruction scheduling — instruction scheduling considerations for register allocation =-=[1, 9, 11, 13]-=- are beyond the scope of this paper. 2.1 Basic Graph Coloring solution to the SFRA problem Figure 1 summarizes the basic Graph Coloring algorithm for Spill-Free Register Allocation as described by Cha... |

104 |
Register allocation by priority-based coloring
- Chow, Hennessy
- 1984
(Show Context)
Citation Context ...nd Initialization for Extended Linear Scan algorithm ELS1 for Register Allocation with Total Spills (see Figure 6) amount of past work on augmenting and refining this priority function, starting with =-=[6]-=-. As mentioned earlier, we expect that these advanced spill heuristics designed for GC will be equally applicable to an ELS foundation. Figures 5 and 6 summarize our Extended Linear Scan algorithm for... |

96 | Register allocation via hierarchical graph coloring - Callahan, Koblenz - 1991 |

71 | Allocation with Instruction Scheduling: A New Approach
- Pinter
- 1993
(Show Context)
Citation Context ...s of instruction ik are written. Second, we assume that register allocation is performed as a separate pass from instruction scheduling — instruction scheduling considerations for register allocation =-=[1, 9, 11, 13]-=- are beyond the scope of this paper. 2.1 Basic Graph Coloring solution to the SFRA problem Figure 1 summarizes the basic Graph Coloring algorithm for Spill-Free Register Allocation as described by Cha... |

66 | Quality and speed in linear-scan register allocation
- Traub, Holloway, et al.
- 1998
(Show Context)
Citation Context ...it prohibitive to use Graph Coloring for register allocation in just-in-time and dynamic compilers, where compile-time overhead contributes directly to run-time. Recent work on Linear Scan algorithms =-=[14, 16]-=- has led to more efficient algorithms for global register allocation that use data structures with size that is linear in the number of variables. The results reported thus far suggest that Linear Sca... |

43 | Optimistic register coalescing - Park, Moon - 1998 |

33 | Fast copy coalescing and live-range identification
- Budimlic, Cooper, et al.
- 2002
(Show Context)
Citation Context ... incur a coherence overhead for loads and stores, compared to register accesses. Further, register-register moves can be optimized by efficient copy coalescing algorithms such as the one presented in =-=[3]-=-. We now outline how the ELS0 algorithm addresses the three limitations for Graph Coloring discussed in Section 2.2: 1. The ELS0 algorithm is guaranteed to find a feasible solution to an SFRA problem ... |

25 | Combining register allocation and instruction scheduling
- Motwani, Palem, et al.
- 1995
(Show Context)
Citation Context ...s of instruction ik are written. Second, we assume that register allocation is performed as a separate pass from instruction scheduling — instruction scheduling considerations for register allocation =-=[1, 9, 11, 13]-=- are beyond the scope of this paper. 2.1 Basic Graph Coloring solution to the SFRA problem Figure 1 summarizes the basic Graph Coloring algorithm for Spill-Free Register Allocation as described by Cha... |

21 | An experimental study of several cooperative register allocation and instruction scheduling strategies
- Norris, Pollock
- 1995
(Show Context)
Citation Context |

1 |
Yet another gcc register allocator
- Makarov
- 2005
(Show Context)
Citation Context ...d of registers, with the goal of finding a solution with the smallest spill cost. Since the GCC compiler used to obtain our experimental results lacks support for pseudo-register live range splitting =-=[8]-=-, an investigation of live range splitting and partial spills in the ELS framework is a subject for future work. Register Allocation with Total Spills (RATS): Given a set of symbolic registers, ℜ, k p... |