## Finding dominators in practice (2004)

### Cached

### Download Links

- [www.cs.princeton.edu]
- [www.emis.de]
- [www.cs.brown.edu]
- [www.emis.math.ca]
- [emis.maths.tcd.ie]
- [www.maths.tcd.ie]
- [www.mat.ub.edu]
- DBLP

### Other Repositories/Bibliography

Venue: | In Proceedings of the 12th Annual European Symposium on Algorithms, volume 3221 of Lecture Notes in Computer Science |

Citations: | 7 - 2 self |

### BibTeX

@INPROCEEDINGS{Georgiadis04findingdominators,

author = {Loukas Georgiadis and Renato F. Werneck and Robert E. Tarjan and David I. August},

title = {Finding dominators in practice},

booktitle = {In Proceedings of the 12th Annual European Symposium on Algorithms, volume 3221 of Lecture Notes in Computer Science},

year = {2004},

pages = {677--688}

}

### OpenURL

### Abstract

Abstract. The computation of dominators in a flowgraph has applications in program optimization, circuit testing, and other areas. Lengauer and Tarjan [17] proposed two versions of a fast algorithm for finding dominators and compared them experimentally with an iterative bit vector algorithm. They concluded that both versions of their algorithm were much faster than the bit-vector algorithm even on graphs of moderate size. Recently Cooper et al. [9] have proposed a new, simple, tree-based iterative algorithm. Their experiments suggested that it was faster than the simple version of the Lengauer-Tarjan algorithm on graphs representing computer program control flow. Motivated by the work of Cooper et al., we present an experimental study comparing their algorithm (and some variants) with careful implementations of both versions of the Lengauer-Tarjan algorithm and with a new hybrid algorithm. Our results suggest that, although the performance of all the algorithms is similar, the most consistently fast are the simple Lengauer-Tarjan algorithm and the hybrid algorithm, and their advantage increases as the graph gets bigger or more complicated. 1

### Citations

842 | Efficiently computing static single assignment form and the control dependence graph - Cytron, Ferrante, et al. - 1991 |

826 | The program dependence graph and its use in optimization
- Ferrante, Ottenstein, et al.
- 1987
(Show Context)
Citation Context ... of natural loop optimizations [32]. Structural analysis [36] also depends on dominance information. Postdominance information is used in calculating control dependencies in program dependence graphs =-=[14]-=-. Dominator trees are used in the computation of dominance frontiers [13], which are needed for efficiently computing program dependence graphs and static single-assignment forms. A dominator-based sc... |

297 |
Tarjan, A data structure for dynamic trees
- Sleator, E
- 1983
(Show Context)
Citation Context ...ive algorithm runs much faster in practice, however. Typically d(G, D) ≤ 3 [16], and it is reasonable to expect that few NCA calculations will require O(n) time. If T is represented as a dynamic tree =-=[21]-=-, the worst-case bound per iteration is reduced to O(m log n), but the implementation becomes much more complicated. Initializations and vertex orderings. Our base implementation of the iterative algo... |

254 |
Efficiency of a Good But Not Linear Set Union Algorithm
- Tarjan
(Show Context)
Citation Context ...], Lengauer and Tarjan [30] proposed an O(mlog n)-time algorithm and a more complicated O(mα(m,n))-time version, where α(m,n) is an extremely slow-growing functional inverse of the Ackermann function =-=[42]-=-. Alstrup et al. [6] gave a linear-time algorithm for the random-access model of computation; a simpler algorithm was given by Buchsbaum et al. [9]. Georgiadis and Tarjan [20] gave a linear-time algor... |

142 | A fast algorithm for finding dominators in a flowgraph
- Lengauer, Tarjan
- 1979
(Show Context)
Citation Context ... NJ, 08544, USA 2 Hewlett-Packard, Palo Alto, CA Abstract. The computation of dominators in a flowgraph has applications in program optimization, circuit testing, and other areas. Lengauer and Tarjan =-=[17]-=- proposed two versions of a fast algorithm for finding dominators and compared them experimentally with an iterative bit vector algorithm. They concluded that both versions of their algorithm were muc... |

137 |
Data structures for weighted matching and nearest common ancestors with linking
- Gabow
- 1990
(Show Context)
Citation Context ...e processed in preorder in the second phase. With the simple implementation of link-eval (which is faster in practice), this method (SNCA) runs in O(n 2 + m log n) worst-case time. We note that Gabow =-=[11]-=- presents a rather complex procedure that computes NCAs in total linear time on a tree that grows by adding leaves. This implies that the second phase of SEMI-NCA can run in O(n) time, but it is unlik... |

135 |
Empirical Study of FORTRAN Programs
- Knuth
- 1971
(Show Context)
Citation Context ...hen a single iteration costs O(mn) time. Because there may be up to O(n) iterations, the running time is O(mn 2 ). The iterative algorithm runs much faster in practice, however. Typically d(G, D) ≤ 3 =-=[16]-=-, and it is reasonable to expect that few NCA calculations will require O(n) time. If T is represented as a dynamic tree [21], the worst-case bound per iteration is reduced to O(m log n), but the impl... |

124 | Global data flow analysis and iterative algorithms
- Kam, Ullman
- 1976
(Show Context)
Citation Context ...be interpreted as a process that modifies a tree T successively until this property holds. The number of iterations depends on the order in which the vertices (or edges) are processed. Kam and Ullman =-=[15]-=- show that certain dataflow equations, including (1), are solved in up to d(G, D) + 3 iterations when the vertices are processed in reverse postorder with respect to a DFS tree D. Here d(G, D) is the ... |

108 |
Worst-cases analysis of set union algorithms
- Tarjan
- 1984
(Show Context)
Citation Context ...iate dominators are derived from relative dominators in a preorder pass. With a simple implementation of link-eval (using path compression but not balancing), the LT algorithm runs in O(m log n) time =-=[25]-=-. With a more sophisticated linking strategy that ensures that F is balanced, LT runs in O(mα(m, n)) time [24]. We refer to these two versions as SLT and LT, respectively. Implementation issues. Bucke... |

87 |
Applications of path compression on balanced trees
- Tarjan
- 1979
(Show Context)
Citation Context ...eval (using path compression but not balancing), the LT algorithm runs in O(m log n) time [25]. With a more sophisticated linking strategy that ensures that F is balanced, LT runs in O(mα(m, n)) time =-=[24]-=-. We refer to these two versions as SLT and LT, respectively. Implementation issues. Buckets have very specific properties in the LengauerTarjan algorithm: (1) every vertex is inserted into at most on... |

80 |
Testing flow graph reducibility
- Tarjan
- 1973
(Show Context)
Citation Context ...lace each arc (w,x) with (v,x), yields a single node. Equivalently, G is reducible if every loop has a single entry vertex from r. In a reducible flowgraph, v dominates u whenever (u,v) is a back arc =-=[40]-=-. Therefore, deletion of back arcs, which produces an acyclic graph, does not affect dominators. The running time per iteration is dominated by the time spent on NCA computations. If these are perform... |

50 |
Finding dominators in directed graphs
- TARJAN
- 1972
(Show Context)
Citation Context ...rward algorithm with complexity O(mn). It consists of performing a search in G − v for all v ∈ V (v obviously dominates all the vertices that become unreachable). Improving on previous work by Tarjan =-=[23]-=-, Lengauer and Tarjan [17] proposed an O(mα(m, n))-time algorithm, where α(m, n) is an extremely slow-growing functional inverse of the Ackermann function. Alstrup et al. [6] gave a lineartime solutio... |

40 | An empirical assessment of algorithms for constructing a minimum spanning tree - Moret, Shapiro - 1994 |

34 | A simple shortest path algorithm with linear average time, in
- Goldberg
(Show Context)
Citation Context ...comparison. 2 Times for computing dominators are given as multiples of BFS. Using a baseline method is a standard technique for evaluating algorithms whose running time is close to linear in practice =-=[23, 24, 31, 33]-=-. In absolute terms, all algorithms are reasonably fast: none is slower than BFS by a factor of more than six on compiler-generated graphs. The worst relative time observed was slightly below eight, f... |

27 |
Characterizations of reducible flow graphs
- Hecht, Ullman
- 1974
(Show Context)
Citation Context ... reverse postorder with respect to a DFS tree D. Here d(G, D) is the loop connectedness of G with respect to D, the largest number of back edges found in any cycle-free path of G. When G is reducible =-=[13]-=- the dominator tree is built in one iteration, because v dominates u whenever (u, v) is a back edge. The running time per iteration is dominated by the time spent on NCA calculations. If they are perf... |

27 | Linear-Time Pointer-Machine Algorithms for Least Common Ancestors
- Buchsbaum, Kaplan, et al.
- 1998
(Show Context)
Citation Context ...[21] constructs ancestordominance spanning trees by running a modified version of the Lengauer-Tarjan algorithm, and therefore takes O(mα(m,n)) time (or linear time using a more complicated algorithm =-=[8, 19]-=-). An open question, of both theoretical and practical interest, is whether there is a simple linear-time construction of such an ordering. Another question that arises immediately is whether any grap... |

25 | Dominators in linear time
- Alstrup, Harel, et al.
- 1999
(Show Context)
Citation Context ... previous work by Tarjan [23], Lengauer and Tarjan [17] proposed an O(mα(m, n))-time algorithm, where α(m, n) is an extremely slow-growing functional inverse of the Ackermann function. Alstrup et al. =-=[6]-=- gave a lineartime solution for the random-access model; a simpler solution was given by Buchsbaum et al. [8]. Georgiadis and Tarjan [12] achieved the first linear-time algorithm for the pointer-machi... |

23 | Dominator-path scheduling: A global scheduling method
- Sweany, Beaty
- 1992
(Show Context)
Citation Context ...inance information extensively during program analysis and optimization, for such diverse goals as natural loop detection (which enables a host of optimizations), structural analysis [20], scheduling =-=[22]-=-, and the computation of dependence graphs and static single-assignment forms [10]. Dominators are also used to identify pairs of equivalent line faults in VLSI circuits [7]. The problem of finding do... |

20 |
Structural Analysis: A New Approach to Flow Analysis in Optimizing Compilers. Computer Languages
- Sharir
- 1980
(Show Context)
Citation Context ...Compilers use dominance information extensively during program analysis and optimization, for such diverse goals as natural loop detection (which enables a host of optimizations), structural analysis =-=[20]-=-, scheduling [22], and the computation of dependence graphs and static single-assignment forms [10]. Dominators are also used to identify pairs of equivalent line faults in VLSI circuits [7]. The prob... |

20 | Shortest path algorithms: Engineering aspects, in
- Goldberg
(Show Context)
Citation Context ...comparison. 2 Times for computing dominators are given as multiples of BFS. Using a baseline method is a standard technique for evaluating algorithms whose running time is close to linear in practice =-=[23, 24, 31, 33]-=-. In absolute terms, all algorithms are reasonably fast: none is slower than BFS by a factor of more than six on compiler-generated graphs. The worst relative time observed was slightly below eight, f... |

14 | A new, simpler linear-time dominators algorithm
- Buchsbaum, Kaplan, et al.
- 1998
(Show Context)
Citation Context ... is an extremely slow-growing functional inverse of the Ackermann function. Alstrup et al. [6] gave a lineartime solution for the random-access model; a simpler solution was given by Buchsbaum et al. =-=[8]-=-. Georgiadis and Tarjan [12] achieved the first linear-time algorithm for the pointer-machine model. Experimental results for the dominators problem appear in [17,8, 9]. In [17] Lengauer and Tarjan fo... |

13 | An incremental algorithm for maintaining the dominator tree of a reducible flowgraph
- Ramalingam, Reps
- 1994
(Show Context)
Citation Context ...nd Dom ′ (w) is the path from NCA(T, {u, w}) to r. Any spanning (sub)tree S of G rooted at r is a valid initialization for T, since for any v ∈ S only vertices in r ∗ →S v can dominate v. It is known =-=[19]-=- that the dominator tree I is such that if w is a vertex in V − r then idom(w) = NCA(I, pred(w)). Thus the iterative algorithm can be interpreted as a process that modifies a tree T successively until... |

11 |
Graph theoretic constructs for program control flow analysis
- Allen, Cocke
- 1972
(Show Context)
Citation Context ... circuits [7]. The problem of finding dominators has been extensively studied. In 1972 Allen and Cocke showed that the dominance relation can be computed iteratively from a set of data-flow equations =-=[5]-=-. A direct implementation of this solution ⋆ L. Georgiadis, R. F. Werneck and R. E. Tarjan partially supported by the Aladdin project, NSF Grant No. CCR-9626862.shas O(mn 2 ) worst-case time. Purdom a... |

8 | Fault equivalence identification using redundancy information and staticand dynamic extraction
- Amyeen, Fuchs, et al.
- 2001
(Show Context)
Citation Context ...analysis [20], scheduling [22], and the computation of dependence graphs and static single-assignment forms [10]. Dominators are also used to identify pairs of equivalent line faults in VLSI circuits =-=[7]-=-. The problem of finding dominators has been extensively studied. In 1972 Allen and Cocke showed that the dominance relation can be computed iteratively from a set of data-flow equations [5]. A direct... |

7 |
Finding dominators revisited
- Georgiadis, Tarjan
- 2004
(Show Context)
Citation Context ...ng functional inverse of the Ackermann function. Alstrup et al. [6] gave a lineartime solution for the random-access model; a simpler solution was given by Buchsbaum et al. [8]. Georgiadis and Tarjan =-=[12]-=- achieved the first linear-time algorithm for the pointer-machine model. Experimental results for the dominators problem appear in [17,8, 9]. In [17] Lengauer and Tarjan found the almost-linear-time v... |

7 | On the implementation of MST-based heuristics for the steiner problem in graphs
- Aragão, Werneck
- 2002
(Show Context)
Citation Context ...comparison. 2 Times for computing dominators are given as multiples of BFS. Using a baseline method is a standard technique for evaluating algorithms whose running time is close to linear in practice =-=[23, 24, 31, 33]-=-. In absolute terms, all algorithms are reasonably fast: none is slower than BFS by a factor of more than six on compiler-generated graphs. The worst relative time observed was slightly below eight, f... |

7 | Using Dominators for Solving Constrained Path Problems
- Quesada, Roy, et al.
- 2006
(Show Context)
Citation Context ... in logic circuits [7]. In constraint programming, dominators have been used to implement generalized reachability constraints, which are helpful in the solution of the ordered disjoint-paths problem =-=[35]-=-. Another field where dominator analysis has been applied is theoretical biology; in [4, 5] dominators are used for the analysis of the extinction of species in trophic models (also called foodwebs). ... |

6 | Algorithm 430: Immediate predominators in a directed graph - Purdom, Moore - 1972 |

5 | The flow analysis and transformation libraries of Machine SUIF
- Holloway, Young
- 1997
(Show Context)
Citation Context ...s do not include creating the graph, but they do include allocating and deallocating the arrays used by each particular algorithm. Instances. We used control-flow graphs produced by the SUIF compiler =-=[14]-=- from benchmarks in the SPEC’95 suite [2] and previously tested by Buchsbaum et al. [8] in the context of dominator analysis. We also used control-flow graphs created by the IMPACT compiler [1] from s... |

4 |
A simple, fast dominance algorithm. Available online at www.cs.rice.edu/~keith/Embed/dom.pdf
- Cooper, Harvey, et al.
- 2000
(Show Context)
Citation Context ...lly with an iterative bit vector algorithm. They concluded that both versions of their algorithm were much faster than the bit-vector algorithm even on graphs of moderate size. Recently Cooper et al. =-=[9]-=- have proposed a new, simple, tree-based iterative algorithm. Their experiments suggested that it was faster than the simple version of the Lengauer-Tarjan algorithm on graphs representing computer pr... |

4 |
Who dominates whom in the ecosystem? Energy flow bottlenecks and cascading extinctions
- Allesina, Bodini
- 2004
(Show Context)
Citation Context ... generalized reachability constraints, which are helpful in the solution of the ordered disjoint-paths problem [35]. Another field where dominator analysis has been applied is theoretical biology; in =-=[4, 5]-=- dominators are used for the analysis of the extinction of species in trophic models (also called foodwebs). The problem of finding dominators has been extensively studied. In 1972 Allen and Cocke sho... |

4 |
Efficiency of equivalence algorithms
- Fischer
- 1972
(Show Context)
Citation Context ...er the vertices in reverse postorder, since the graph is acyclic. The semidominator-based methods also run in linear time. Simple Lengauer-Tarjan. Family sltworst(k) causes worst-case behavior of SLT =-=[15, 44]-=-. For any particular k this is a graph with k vertices (r = x1,...,xk) and 2k−2 arcs that causes path compression without balancing to take Θ(k log k) time. The graph contains the arcs (xi,xi+1), 1 ≤ ... |

4 | Dominator tree verification and vertex-disjoint paths
- Georgiadis, Tarjan
- 2005
(Show Context)
Citation Context ... if the iterative algorithm processes the arcs according to σ, then it will construct the dominator tree of G in a single iteration. Proof: We will use ancestor-dominance spanning trees as defined in =-=[21]-=-. There it is shown that G has two spanning trees T1 and T2 such that, for any v, the paths r ∗ →T1 v and r ∗ →T2 v intersect only at the vertices of Dom(v). We construct σ by catenating a list σ1 of ... |

4 |
Advanced Compiler Design and Implementation, chapter 12.2
- Muchnick
- 1997
(Show Context)
Citation Context ... dominance information during program analysis and optimization. Perhaps the best-known application of dominators is natural loop detection, which in turn enables a host of natural loop optimizations =-=[32]-=-. Structural analysis [36] also depends on dominance information. Postdominance information is used in calculating control dependencies in program dependence graphs [14]. Dominator trees are used in t... |

3 |
Secondary extinctions in ecological networks: bottlenecks unveiled. Ecological Modelling 194
- Allesina, Bodini, et al.
- 2006
(Show Context)
Citation Context ... generalized reachability constraints, which are helpful in the solution of the ordered disjoint-paths problem [35]. Another field where dominator analysis has been applied is theoretical biology; in =-=[4, 5]-=- dominators are used for the analysis of the extinction of species in trophic models (also called foodwebs). The problem of finding dominators has been extensively studied. In 1972 Allen and Cocke sho... |

3 | Iterative Data-Flow Analysis, Revisited
- Cooper, Harvey, et al.
- 2002
(Show Context)
Citation Context ...ce of the iterative algorithm in a constant number of iterations. The answer is negative. Figure 1 shows linearvit(k), a graph family that requires Θ(k) = Θ(n) iterations. A similar graph was used in =-=[12]-=- in order to show that by processing the vertices in reverse postorder, Θ(n) iterations are necessary. The next lemma shows that in fact this graph requires Θ(n) iterations for any fixed ordering of t... |

2 |
Complexity-based denial-of-service attacks on mobile code systems
- Gal, Probst, et al.
- 2004
(Show Context)
Citation Context ...and IDFS are tight. Although such graphs are unlikely to appear in practice, it is important to study them because similar patterns may occur in real-world instances. Also, as discussed by Gal et al. =-=[17, 18]-=-, in an extreme situation a malicious user could exploit the worst-case behavior of a compiler to launch a denial-of-service attack. Figure 2 shows graph families that favor particular methods against... |

2 |
Linear-Time Algorithms for Dominators and Related Problems
- Georgiadis
- 2005
(Show Context)
Citation Context ...ubscript when the context is clear. Given a tree T, we denote by 1 Since most of the algorithms have been presented elsewhere, we do not show pseudocodes here. The interested reader will find them in =-=[19]-=-.sL. Georgiadis et al., Dominators in Practice, JGAA, 10(1) 69–94 (2006) 72 Tv the subtree of T rooted at v, and by pT(v) the parent of v in T. If T is a spanning tree of a flowgraph G = (V,A,r), an a... |

1 | Average case vs. worst case: Margins of safety in system design
- Gal, Probst, et al.
- 2005
(Show Context)
Citation Context ...and IDFS are tight. Although such graphs are unlikely to appear in practice, it is important to study them because similar patterns may occur in real-world instances. Also, as discussed by Gal et al. =-=[17, 18]-=-, in an extreme situation a malicious user could exploit the worst-case behavior of a compiler to launch a denial-of-service attack. Figure 2 shows graph families that favor particular methods against... |