On the Complexity of Register Coalescing

  title={On the Complexity of Register Coalescing},
  author={Florent Bouchez and Alain Darte and Fabrice Rastello},
  journal={International Symposium on Code Generation and Optimization (CGO'07)},
Memory transfers are becoming more important to optimize, for both performance and power consumption. With this goal in mind, new register allocation schemes are developed, which revisit not only the spilling problem but also the coalescing problem. Indeed, a more aggressive strategy to avoid load/store instructions may increase the constraints to suppress (coalesce) move instructions. This paper is devoted to the complexity of the coalescing phase, in particular in the light of recent… 

Figures from this paper

Advanced conservative and optimistic register coalescing
The results show that optimistic strategies do not outperform conservative ones, and incremental conservative coalescing performs even better than the improved de-coalescing scheme and leads to about 15% improvement compared to the state-of-the-art optimistic coalescing.
Improvements to Conservative and Optimistic Register Coalescing
It is shown that, with a more involved conservative strategy, incremental conservative coalescing can be as e ( cid:14) cient as optimistic coalescing, and a more aggressive optimistic approach with a di (cid:11) erent de-coalescing phase is developed.
Live-range Unsplitting for Faster Optimal Coalescing ( extended version )
This report provides all the solutions of the optimal coalescing challenge, including the 3 instances that were previously unsolved, and presents some theoretical properties that give rise to an algorithm for reducing interference graphs, while preserving optimality.
Studying optimal spilling in the light of SSA
  • Quentin ColombetF. BrandnerA. Darte
  • Economics
    2011 Proceedings of the 14th International Conference on Compilers, Architectures and Synthesis for Embedded Systems (CASES)
  • 2011
A new integer linear programming formulation is developed, more accurate and expressive than previous approaches and can express SSA φ-functions, memory-to-memory copies, and the fact that a value can be stored simultaneously in a register and in memory.
Live-range unsplitting for faster optimal coalescing
This paper presents some theoretical properties that give rise to an algorithm for reducing interference graphs that preserves the optimality of coalescing and provides all the optimal solutions of the optimal coalescing challenge, including the three instances that were previously unsolved.
Copy elimination on data dependence graphs
This work presents an extension of a local recoloring technique called Parallel Copy Motion that performs code motion on data dependence graphs in order to eliminate useless copies and reorder instructions, while at the same time a valid register assignment is preserved.
Copy coalescing by graph recoloring
A coalescing technique designed for, but not limited to, SSA-form register allocation that improves upon two long-standing inconveniences of graph coloring register allocation by exploiting that a valid coloring can be easily obtained by an Ssa-based register allocator.
Register allocation by graph coloring under full live-range splitting
This paper presents some theoretical properties that give rise to an algorithm for reducing and decomposing interference graphs, and provides all the optimal solutions of the optimal coalescing challenge, including the three instances that were previously unsolved.
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.


Iterated register coalescing
This work shows how to interleave coloring reductions with Briggs's coalescing heuristic, leading to an algorithm that is safe but much more aggressive.
Optimistic register coalescing
  • Jinpyo ParkSoo-Mook Moon
  • Computer Science
    Proceedings. 1998 International Conference on Parallel Architectures and Compilation Techniques (Cat. No.98EX192)
  • 1998
This paper proposes a new heuristic called optimistic coalescing which optimistically performs aggressive coalescing, thus fully exploiting the positive impact of coalesce, yet when a coalesced node is to be spilled, it is split back into separate nodes; there as a better chance of coloring one of them which reduces the overall spill cost.
Register allocation and spill complexity under SSA
This first advanced study on the complexity of the spill problem under SSA greatly helps to the understanding and gives directions for polynomial approximations.
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.
Optimal spilling for CISC machines with few registers
This work shows how to optimally split live ranges and optimally use addressing modes, and shows a variant of Park and Moon's optimistic coalescing algorithm that does a very good (though not provably optimal) job of removing the register-register moves.
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.
Optimizing translation out of SSA using renaming constraints
This work proposes a method to reduce the /spl Phi/-related copies during the out of SSA translation, thanks to a pinning-based coalescing algorithm that is aware of renaming constraints.
Optimizing the translation out-of-SSA with renaming constraints
This paper proposes an extension of the algorithm of Leung and George to minimize the -related copies during the out-of-SSA translation to present a renaming-constraints aware and pinning-based coalescing algorithm.
Fusion-based register allocation
Fusion-based register allocation uses the structure of the program to make splitting and spilling decisions, with the goal to move overhead operations to infrequently executed parts of a program.
Practical Improvements to the Construction and Destruction of Static Single Assignment Form
This paper presents a meta-modelling system that automates the very labor-intensive and therefore time-heavy and expensive and therefore expensive and expensive process of computer programming called “hacking”.