Linear scan register allocation on SSA form

  title={Linear scan register allocation on SSA form},
  author={Christian Wimmer and Michael Franz},
  booktitle={CGO '10},
The linear scan algorithm for register allocation provides a good register assignment with a low compilation overhead and is thus frequently used for just-in-time compilers. Although most of these compilers use static single assignment (SSA) form, the algorithm has not yet been applied on SSA form, i.e., SSA form is usually deconstructed before register allocation. However, the structural properties of SSA form can be used to simplify the algorithm. With only one definition per variable… 

SSA-Form-Based Register Allocation for the Java HotSpot

  • Computer Science
  • 2010
Comparing graph coloring and linear scan register allocation on SSA form turns out the two algorithms are not so different than they look at the first glance, so the next research step is to analyze the cases where the two algorithm are equivalent and find cases where they still differ.

Trace-based Register Allocation in a JIT Compiler

A novel non-global algorithm is proposed, which splits a compilation unit into traces based on profiling feedback and subsequently performs register allocation within each trace individually, which simplifies the problem a register allocator needs to solve.

A decoupled non-SSA global register allocation using bipartite liveness graphs

A decoupled non-SSA--based global register allocation algorithm for dynamic compilation is proposed by introducing a Bipartite Liveness Graph (BLG)-based register allocation algorithms that models the spilling phase as an optimization problem on the BLG itself and the assignment phase as a separate optimization problem.

Trace register allocation

Trace Register Allocation is proposed, a register allocation approach that is tailored for just-in-time (JIT) compilation in the context of virtual machines with run-time feedback to offload costly operations such as spilling and splitting to less frequently executed branches and to focus on efficient registers allocation for the hot parts of a program.

Trace Register Allocation Policies: Compile-time vs. Performance Trade-offs

This work presents a register allocation framework that can exploit the additional flexibility of traces to select different allocation strategies based on the characteristics of a trace, providing fine-grained control over the trade-off between compile time and peak performance in a just-in-time compiler.

Divide and Allocate : The Trace Register Allocation Framework ACM Student Research Competition Grand Finals

This work developed a novel trace register allocation framework which competes with global approaches in both compile time and code quality and is able to select di erent allocation strategies based on the characteristics of a trace to control the trade-o between compiling time and peak performance.

Efficient global register allocation

A new register allocation algorithm is described that solves an inability of the similarly motivated Treescan register allocator to look ahead of the instruction being allocated - allowing an unconstrained allocation order, and an ability to better handle fixed registers and loop carried values.

Parallel trace register allocation

A theoretical model for parallel register allocation is developed and it is shown that it can be used in practice without a negative impact on the quality of the allocation result and reduces compilation latency, i.e., the duration until the result of a compilation is available.

Graph-coloring and treescan register allocation using repairing

A decoupled approach that first lowers the register pressure by spilling variables, and then performs live ranges splitting/coalescing /coloring in a separate phase enables the design of simpler, cleaner, and more efficient register allocators.

Allocation folding based on dominance

This paper introduces it allocation folding, an optimization technique where the virtual machine automatically folds multiple memory allocation operations in optimized code together into a single, larger it allocation group, and discusses the implementation in V8, an open-source, production JavaScript virtual machine.



Optimized interval splitting in a linear scan register allocator

An optimized implementation of the linear scan register allocation algorithm for Sun Microsystems' Java HotSpot™ client compiler is presented, with the high impact of the Intel SSE2 extensions on the speed of numeric Java applications.

Quality and speed in linear-scan register allocation

This paper implements both register allocators within the Machine SUIF extension of the Stanford SUIF compiler system and describes improvements to the linear-scan approach that allow it to produce code of a quality near to that produced by graph coloring.

SSA Elimination after Register Allocation

It is shown that spill-free SSA elimination takes less than five percent of the total compilation time of a JIT compiler and three optimizations of the core algorithm reduce the number of memory accesses and improve the program execution time.

Linear Scan Register Allocation for the Java HotSpot™ Client Compiler

Benchmark results prove that the linear scan algorithm is a good tradeoff if both compilation time and runtime of a program matter: the compilation time is only slightly higher in comparison with the old local heuristic for register allocation, but the resulting code executes about 30% faster.

Linear Scan Register Allocation in the Context of SSA Form and Register Constraints

This work shows how linear scan register allocation can be applied to register-constrained architectures like the Intel x86 and confirms that linear scan is several times faster than graph coloring for medium-sized to large programs.

Register allocation for programs in SSA form

A novel register allocation architecture for programs in SSA-form is presented which simplifies register allocation significantly and a heuristic methods for spilling and coalescing are compared to an optimal method based on integer linear programming.

Extended Linear Scan: An Alternate Foundation for Global Register Allocation

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.

Linear scan register allocation

A new algorithm for fast global register allocation called linear scan, which allocates registers to variables in a single linear-time scan of the variables' live ranges, is described.

Register allocation by puzzle solving

We show that register allocation can be viewed as solving a collection of puzzles. We model the register file as a puzzle board and the program variables as puzzle pieces; pre-coloring and register

Fast copy coalescing and live-range identification

Experimental results demonstrate that the algorithm presented is almost as precise (within one percent on average) as the improved interference-graph-based coalescing algorithm, while requiring three times less compilation time.