The program structure tree: computing control regions in linear time

In this paper, we describe the program structure tree (PST), a hierarchical representation of program structure based on single entry single exit (SESE) regions of the control flow graph. We give a linear-time algorithm for finding SESE regions and for building the PST of arbitrary control flow graphs (including irreducible ones). Next, we establish a connection between SESE regions and control dependence equivalence classes, and show how to use the algorithm to find control regions in linear time. Finally, we discuss some applications of the PST. Many control flow algorithms, such as construction of Static Single Assignment form, can be speeded up by applying the algorithms in a divide-and-conquer style to each SESE region on its own. The PST is also used to speed up data flow analysis by exploiting “sparsity”. Experimental results from the Perfect Club and SPEC89 benchmarks confirm that the PST approach finds and exploits program structure.

[1]  Vivek Sarkar,et al.  Compact representations for control dependence , 1990, PLDI '90.

[2]  THOMAS BALL What ’ s in a Region ?-or-Computing Control Dependence Regions in Linear Time and Space , 1992 .

[3]  Mark N. Wegman,et al.  Efficiently computing static single assignment form and the control dependence graph , 1991, TOPL.

[4]  Mark N. Wegman,et al.  A Fast and Usually Linear Algorithm for Global Flow Analysis , 1976, J. ACM.

[5]  F. Kenneth Zadeck,et al.  Incremental data flow analysis in a structured program editor , 1984, SIGPLAN '84.

[6]  G H Ettinger,et al.  Queen's University. , 1962, Canadian Medical Association journal.

[7]  Joe D. Warren,et al.  The program dependence graph and its use in optimization , 1987, TOPL.

[8]  Barbara G. Ryder,et al.  Elimination algorithms for data flow analysis , 1986, CSUR.

[9]  K. Pingali,et al.  Finding Regions Fast: Single Entry Single Exit and Control Regions in Linear Time , 1993 .

[10]  Ron K. Cytron,et al.  Efficiently computing φ-nodes on-the-fly , 1993 .

[11]  Dhananjay M. Dhamdhere,et al.  How to analyze large programs efficiently and informatively , 1992, PLDI '92.

[12]  Robert E. Tarjan,et al.  A fast algorithm for finding dominators in a flowgraph , 1979, TOPL.

[13]  Robert E. Tarjan Prime subprogram parsing of a program , 1980, POPL '80.

[14]  Barbara G. Ryder,et al.  An efficient hybrid algorithm for incremental data flow analysis , 1989, POPL '90.

[15]  Arthur B. Maccabe,et al.  The program dependence web: a representation supporting control-, data-, and demand-driven interpretation of imperative languages , 1990, PLDI '90.

[16]  Ron Cytron,et al.  Efficiently Computing phi-Nodes On-The-Fly (Extended Abstract) , 1993, LCPC.

[17]  Jacobo Valdes Parsing Flowcharts and Series-Parallel Graphs , 1978 .

[18]  Jong-Deok Choi,et al.  Automatic construction of sparse data flow evaluation graphs , 1991, POPL '91.

[19]  Keshav Pingali,et al.  From Control Flow to Dataflow , 1991, J. Parallel Distributed Comput..

[20]  Guang R. Gao,et al.  Computing phi-nodes in linear time using DJ graphs , 1995, J. Program. Lang..

[21]  John Cocke,et al.  A program data flow analysis procedure , 1976, CACM.

[22]  Keshav Pingali,et al.  Dependence-based program analysis , 1993, PLDI '93.