Optimized interval splitting in a linear scan register allocator

  title={Optimized interval splitting in a linear scan register allocator},
  author={Christian Wimmer and Hanspeter M{\"o}ssenb{\"o}ck},
  booktitle={International Conference on Virtual Execution Environments},
We present an optimized implementation of the linear scan register allocation algorithm for Sun Microsystems' Java HotSpot™ client compiler. Linear scan register allocation is especially suitable for just-in-time compilers because it is faster than the common graph-coloring approach and yields results of nearly the same quality.Our allocator improves the basic linear scan algorithm by adding more advanced optimizations: It makes use of lifetime holes, splits intervals if the register pressure… 

Figures and Tables from this paper

Linear scan register allocation on SSA form

The linear scan register allocator of the Java HotSpot client compiler is modified so that it operates on SSA form, and the simpler and faster version generates equally good or slightly better machine code.

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.

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.

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.

Register Spilling and Live-Range Splitting for SSA-Form Programs

This paper generalizes the well-known furthest-first algorithm, which is known to work well on straight-line code, to control-flow graphs, and presents a spilling algorithm for programs in SSA form that is competitive with standard linear-scan allocators.

Tree register allocation

  • Hongbo Rong
  • Computer Science
    2009 42nd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO)
  • 2009
This paper presents tree register allocation, which maps the lifetimes of the variables in a program into a set of trees, colors each tree in a greedy style, which is optimal when there is no

Fast, frequency-based, integrated register allocation and instruction scheduling

The integrated register allocator and instruction scheduler achieved good code quality with significantly reduced compilation times, and the integrated optimizer is able to take advantage of execution frequencies obtained through profiling.

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.

Parallel copy motion

Experiments show that an SSA-based register allocator can be applied broadly now, even for procedures with non-splittable edges: while those procedures could not be compiled before, with parallel copy motion, all moves could be pushed out of such edges.

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.



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.

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.

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.

Adding Static Single Assignment Form and a Graph Coloring Register Allocator to the Java Hotspot™ Client Compiler

A prototype compiler is implemented that creates a control flow graph, transforms the intermediate representation of the program into SSA form and does register allocation with graphcoloring and the code generator is still missing.

Improvements to graph coloring register allocation

This paper describes two improvements to Chaitin-style graph coloring register allocators, and provides a detailed description of optimistic coloring and rematerialization, and presents experimental data to show the performance of several versions of the register allocator on a suite of FORTRAN programs.

Escape analysis in the context of dynamic compilation and deoptimization

A new intraProcedural and interprocedural algorithm for escape analysis in the context of dynamic compilation where the compiler has to cope with dynamic class loading and deoptimization is presented.

Efficiently computing static single assignment form and the control dependence graph

New algorithms that efficiently compute static single assignment form and control dependence graph data structures for arbitrary control flow graphs are presented and it is given that all of these data structures are usually linear in the size of the original program.