A non-iterative data-flow algorithm for computing liveness sets in strict SSA programs

  • Authors:
  • Benoit Boissinot;Florian Brandner;Alain Darte;Benoît Dupont de Dinechin;Fabrice Rastello

  • Affiliations:
  • LIP, UMR 5668 CNRS, INRIA, ENS-Lyon, UCB-Lyon, France;LIP, UMR 5668 CNRS, INRIA, ENS-Lyon, UCB-Lyon, France;LIP, UMR 5668 CNRS, INRIA, ENS-Lyon, UCB-Lyon, France;Kalray;LIP, UMR 5668 CNRS, INRIA, ENS-Lyon, UCB-Lyon, France

  • Venue:
  • APLAS'11 Proceedings of the 9th Asian conference on Programming Languages and Systems
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.