A Fast and Usually Linear Algorithm for Global Flow Analysis

  • Authors:
  • Susan L. Graham;Mark Wegman

  • Affiliations:
  • Computer Science Division, 573 Evans Hall, University of California, Berkeley, CA;IBM Thomas J Watson Research Center, Yorktown Heights, NY and University of California, Berkeley, California

  • Venue:
  • Journal of the ACM (JACM)
  • Year:
  • 1976

Quantified Score

Hi-index 0.04

Visualization

Abstract

A new algorithm for global flow analysis on reducible graphs is presented. The algorithm is shown to treat a very general class of function spaces. For a graph of e edges, the algorithm has a worst-case time bound of O(e log e) function operations. It is also shown that in programming terms, the number of operations is proportional to e plus the number of exits from program loops. Consequently a restriction to one-entry one-exit control structures guarantees linearity. The algorithm can be extended to yet larger classes of function spaces and graphs by relaxing the time bound. Examples are given of code improvement problems which can be solved using the algorithm.