A Non-iterative Data-Flow Algorithm for Computing Liveness Sets in Strict SSA Programs

We revisit the problem of computing liveness sets (the sets of variables live-in and live-out of basic blocks) for programs in strict static single assignment (SSA). In strict SSA, aka SSA with dominance property, the definition of a variable always dominates all its uses. We exploit this property a...

Full description

Saved in:
Bibliographic Details
Published inProgramming Languages and Systems pp. 137 - 154
Main Authors Boissinot, Benoit, Brandner, Florian, Darte, Alain, de Dinechin, Benoît Dupont, Rastello, Fabrice
Format Book Chapter
LanguageEnglish
Published Berlin, Heidelberg Springer Berlin Heidelberg 2011
SeriesLecture Notes in Computer Science
Subjects
Online AccessGet full text
ISBN9783642253171
3642253172
ISSN0302-9743
1611-3349
DOI10.1007/978-3-642-25318-8_13

Cover

More Information
Summary:We revisit the problem of computing liveness sets (the sets of variables live-in and live-out of basic blocks) for programs in strict static single assignment (SSA). In strict SSA, aka SSA with dominance property, the definition of a variable always dominates all its uses. We exploit this property and the concept of loop-nesting forest to design a fast two-phases data-flow algorithm: a first pass traverses the control-flow graph (CFG), propagating liveness information backwards, a second pass traverses a loop-nesting forest, updating liveness sets within loops. The algorithm is proved correct even for irreducible CFGs. We analyze its algorithmic complexity and evaluate its efficiency on SPECINT 2000. Compared to traditional iterative data-flow approaches, which perform updates until a fixed point is reached, our algorithm is 2 times faster on average. Other approaches are possible that propagate from uses to definitions, one variable at a time, instead of unioning sets as in data-flow analysis. Our algorithm is 1.43 times faster than the fastest alternative on average, when sets are represented as bitsets and for optimized programs, which have non-trivial live-ranges and a larger number of variables.
ISBN:9783642253171
3642253172
ISSN:0302-9743
1611-3349
DOI:10.1007/978-3-642-25318-8_13