Computing Liveness Sets for SSA-Form Programs

Florian Brandner 1 Benoit Boissinot 1 Alain Darte 1 Benoît Dupont de Dinechin 2 Fabrice Rastello 1
1 COMPSYS - Compilation and embedded computing systems
Inria Grenoble - Rhône-Alpes, LIP - Laboratoire de l'Informatique du Parallélisme
Abstract : We revisit the problem of computing liveness sets, i.e., the set of variables live-in and live-out of basic blocks, for programs in strict SSA (static single assignment). Strict SSA is also known as SSA with dominance property because it ensures that the definition of a variable always dominates all its uses. This property can be exploited to optimize the computation of liveness sets. Our first contribution is the design of a fast data-flow algorithm, which, unlike traditional approaches, avoids the iterative calculation of a fixed point. Thanks to the properties of strict SSA form and the use of a loop-nesting forest, we show that two passes are sufficient. A first pass, similar to the initialization of iterative data-flow analysis, traverses the control-flow graph in postorder propagating liveness information backwards. A second pass then traverses the loop-nesting forest, updating liveness information within loops. Another approach is to propagate from uses to definition, one variable and one path at a time, instead of unioning sets as in standard data-flow analysis. Such a path-exploration strategy was proposed by Appel in his ''Tiger book'' and is also used in the LLVM compiler. Our second contribution is to show how to extend and optimize algorithms based on this idea to compute liveness sets one variable at a time using adequate data~structures. Finally, we evaluate and compare the efficiency of the proposed algorithms using the SPECINT 2000 benchmark suite. The standard data-flow approach is clearly outperformed, all algorithms show substantial speed-ups of a factor of 2 on average. Depending on the underlying set implementation either the path-exploration approach or the loop-forest-based approach provides superior performance. Experiments show that our loop-forest-based algorithm provides superior performances (average speed-up of 43% on the fastest alternative) when sets are represented as bitsets and for optimized programs, i.e., when there are more variables and larger live-sets and live-ranges.
Document type :
Reports
[Research Report] RR-7503, INRIA. 2011, pp.25
Liste complète des métadonnées


https://hal.inria.fr/inria-00558509
Contributor : Florian Brandner <>
Submitted on : Tuesday, April 12, 2011 - 2:50:08 PM
Last modification on : Saturday, September 17, 2016 - 1:36:49 AM
Document(s) archivé(s) le : Saturday, December 3, 2016 - 1:42:59 PM

File

RR-7503.pdf
Files produced by the author(s)

Identifiers

  • HAL Id : inria-00558509, version 2

Collections

Citation

Florian Brandner, Benoit Boissinot, Alain Darte, Benoît Dupont de Dinechin, Fabrice Rastello. Computing Liveness Sets for SSA-Form Programs. [Research Report] RR-7503, INRIA. 2011, pp.25. <inria-00558509v2>

Share

Metrics

Record views

527

Document downloads

648