## A fast algorithm for finding dominators in a flowgraph (1979)

### Cached

### Download Links

- [www.cs.princeton.edu]
- [www.cs.princeton.edu]
- DBLP

### Other Repositories/Bibliography

Venue: | ACM Transactions on Programming Languages and Systems |

Citations: | 159 - 3 self |

### BibTeX

@ARTICLE{Lengauer79afast,

author = {Thomas Lengauer and Robert Endre and Tar Jan},

title = {A fast algorithm for finding dominators in a flowgraph},

journal = {ACM Transactions on Programming Languages and Systems},

year = {1979},

volume = {1},

pages = {121--141}

}

### Years of Citing Articles

### OpenURL

### Abstract

A fast algoritbm for finding dominators in a flowgraph is presented. The algorithm uses depth-first search and an efficient method of computing functions defined on paths in trees. A simple implemen-tation of the algorithm runs in O(m log n) time, where m is the number of edges and n is the number of vertices in the problem graph. A more sophisticated implementation runs in O(ma(m, n)) time, where a(m, n) is a functional inverse of Ackermann's function. Both versions of the algorithm were implemented in Algol W, a Stanford University version of Algol, and tested on an IBM 370/168. The programs were compared with an implementation by Purdom and Moore of a straightforward O(mn)-time algorithm, and with ~a bit vector algorithm described by Aho and Ullman. The fast algorithm beat the straightforward algorithm and the bit vector algorithm on all but the smallest graphs tested.

### Citations

1105 | Depth-first search and linear graph algorithms
- Tarjan
- 1972
(Show Context)
Citation Context ...s is small (on reducible flowgraphs [3] only two passes are required [4]). In this paper we shall describe a faster algorithm for solving the dominators problem. The algorithm uses depth-first search =-=[9]-=- in combination with a data structure for evaluating functions defined on paths in trees [14]. We present a simple implementation of the algorithm which runs in O (m log n) time and a more sophisticat... |

275 |
The Art of Computer Programming, Vol. 1: Fundamental Algorithms (Third Edition
- Knuth
- 1997
(Show Context)
Citation Context ...3. Depth-first search of flowgraph in Fig. 1. Solid edges are spanning tree edges; dashed edges are nontree edges. Number in parentheses is vertex number; letter is semidominator numbered in preorder =-=[5]-=-. See Figure 3. For convenience in stating our results, we shall assume in this section that all vertices are identified by number. The following paths lemma is an important property of depth-first se... |

215 |
The Theory of Parsing
- Aho, Ullman
- 1972
(Show Context)
Citation Context ...flow analysis, graph algorithm, path compression CR Categories: 4.12, 4.34, 5.25, 5.32 1. INTRODUCTION The following graph problem arises in the study of global flow analysis and program optimization =-=[2, 6]-=-. Let G = (V, E, r) be a flowgraph 1 with start vertex r. A vertex v dominates another vertex w ~ v in G if every path from r to w contains v. Vertex v is the immediate dominator of w, denoted v ffi i... |

91 |
Applications of path compression on balanced trees
- Tarjan
- 1979
(Show Context)
Citation Context ...shall describe a faster algorithm for solving the dominators problem. The algorithm uses depth-first search [9] in combination with a data structure for evaluating functions defined on paths in trees =-=[14]-=-. We present a simple implementation of the algorithm which runs in O (m log n) time and a more sophisticated implementation which runs in O(rna(m, n)) time, where a(rn, n) is a functional inverse of ... |

61 |
Zum Hilbertschen Aufbau der reellen
- Ackermann
- 1928
(Show Context)
Citation Context ... implementation of the algorithm which runs in O (m log n) time and a more sophisticated implementation which runs in O(rna(m, n)) time, where a(rn, n) is a functional inverse of Ackermann's function =-=[1]-=-, defined as follows. For integers i,j >_ 0, let A(i, 0) ffi 0 if i _> 0, A(0,j) = 2 y ifj _> 1, A(i, 1) = A(i - 1, 2) if i _> 1, and A(i,j) ffi A(i - 1, A(i,j- 1)) if i __ 1, j_> 2. Then a(m, n) = mi... |

53 | Finding dominators in a directed graphs - Tarjan - 1974 |

46 |
A simple algorithm for global data flow analysis problems
- HECHT, S, et al.
- 1977
(Show Context)
Citation Context ...actor associated with the bit vector operations is very small, and on typical graphs representing real programs the number of passes is small (on reducible flowgraphs [3] only two passes are required =-=[4]-=-). In this paper we shall describe a faster algorithm for solving the dominators problem. The algorithm uses depth-first search [9] in combination with a data structure for evaluating functions define... |

38 |
Object code optimization
- Lowry, Medlock
- 1969
(Show Context)
Citation Context ...flow analysis, graph algorithm, path compression CR Categories: 4.12, 4.34, 5.25, 5.32 1. INTRODUCTION The following graph problem arises in the study of global flow analysis and program optimization =-=[2, 6]-=-. Let G = (V, E, r) be a flowgraph 1 with start vertex r. A vertex v dominates another vertex w ~ v in G if every path from r to w contains v. Vertex v is the immediate dominator of w, denoted v ffi i... |

11 |
Tarjan, Applications of path compression on balanced trees
- E
- 1979
(Show Context)
Citation Context ...m by rewriting DFS and COMPRESS as nonrecursive procedures which use explicit stacks. One can avoid using an auxiliary stack for COMPRESS by instead .using a trick of reversing ancestor pointers; see =-=[12]-=-. A similar trick allows one to avoid the use of an auxiliary stack for DFS. One can save some additional storage by combining certain arrays, such as parent and ancestor. These modifications save run... |

6 |
Algorithm 430: Immediate predominators in a directed graph
- Purdom, Moore
- 1972
(Show Context)
Citation Context ... in Section 2 to find dominators. Earlier versions of the algorithm appear in [10-12]; the version we present is refined to the point where it is as simple to program as the straightforward algorithm =-=[2, 7]-=- or the bit vector algorithm [3, 4], similar in speed on small graphs, and much faster on large graphs. The algorithm consists of the following four steps. Step 1. Step 2. Step 3. Step 4. Input Carry ... |

4 |
Combinatorial aspects of symbolic program analysis
- Reif
- 1977
(Show Context)
Citation Context ...ges and Systems, Vol. 1, No. 1, July 1979. 140s138 T. Lengauer and R. E. Tarjan values of n. Second, the dominator tree, not the dominator relation, is required for many kinds of global flow analysis =-=[8, 13]-=-, but the bit vector algorithm computes only the dominator relation. Computing the relation from the tree is easy, requiring constant time per element of the relation or O(n) bit vector operations tot... |

2 |
Solving path problems on directed graphs
- TARJAN
- 1975
(Show Context)
Citation Context ...ges and Systems, Vol. 1, No. 1, July 1979. 140s138 T. Lengauer and R. E. Tarjan values of n. Second, the dominator tree, not the dominator relation, is required for many kinds of global flow analysis =-=[8, 13]-=-, but the bit vector algorithm computes only the dominator relation. Computing the relation from the tree is easy, requiring constant time per element of the relation or O(n) bit vector operations tot... |

1 | Edge-disjoint spanning trees, dominators, and depth-first - TARJAN - 1974 |