A linear time algorithm for placing &phgr;-nodes

  • Authors:
  • Vugranam C. Sreedhar;Guang R. Gao

  • Affiliations:
  • School of Computer Science, McGill University, Montreal H3A 2A7, Canada;School of Computer Science, McGill University, Montreal H3A 2A7, Canada

  • Venue:
  • POPL '95 Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
  • Year:
  • 1995

Quantified Score

Hi-index 0.00

Visualization

Abstract

Dataflow analysis framework based on Static Single Assignment (SSA) form and Sparse Evaluation Graphs (SEGs) demand fast computation of program points where data flow information must be merged, the so-called &fgr;-nodes. In this paper, we present a surprisingly simple algorithm for computing &fgr;-nodes for arbitrary flowgraphs (reducible or irreducible) that runs in linear time. We employ a novel program representation—the DJ graph—by augmenting the dominator tree of a flowgraph with edges which may lead to a potential “merge” of dataflow information. In searching for &fgr;-nodes we never visit an edge in the DJ-graph more than once by guiding the search of nodes by their levels in the dominator tree.The algorithm has been implemented and the results are compared with the well known algorithm due to Cytron et al. A consistent and significant speedup has been observed over a range of 46 Fortran procedures taken from a number of benchmark programs. We also ran experiments on increasingly taller ladder graphs and confirmed the linear time complexity of our algorithm.