Finding Dominators in Practice

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]  Irith Pomeranz,et al.  Fault equivalence identification using redundancy information and static and dynamic extraction , 2001, Proceedings 19th IEEE VLSI Test Symposium. VTS 2001.

[2]  Robert E. Tarjan,et al.  Dominator tree verification and vertex-disjoint paths , 2005, SODA '05.

[3]  Jan van Leeuwen,et al.  Worst-case Analysis of Set Union Algorithms , 1984, JACM.

[4]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .

[5]  Andrew V. Goldberg,et al.  A Simple Shortest Path Algorithm with Linear Average Time , 2001, ESA.

[6]  Timothy J. Harvey,et al.  AS imple, Fast Dominance Algorithm , 1999 .

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

[8]  Gerald J. Holloway,et al.  The flow analysis and transformation libraries of Machine SUIF , 1997 .

[9]  S.J. Beaty,et al.  Dominator-path Scheduling - A Global Scheduling Method , 1992, [1992] Proceedings the 25th Annual International Symposium on Microarchitecture MICRO 25.

[10]  Mikkel Thorup,et al.  Dominators in Linear Time , 1999, SIAM J. Comput..

[11]  Jeffrey D. Ullman,et al.  Characterizations of Reducible Flow Graphs , 1974, JACM.

[12]  Robert E. Tarjan Testing flow graph reducibility , 1973, STOC '73.

[13]  Jeffrey D. Ullman,et al.  Global Data Flow Analysis and Iterative Algorithms , 1976, J. ACM.

[14]  Thomas W. Reps,et al.  An incremental algorithm for maintaining the dominator tree of a reducible flowgraph , 1994, POPL '94.

[15]  Yves Deville,et al.  Using Dominators for Solving Constrained Path Problems , 2006, PADL.

[16]  Robert E. Tarjan,et al.  Finding Dominators in Directed Graphs , 1974, SIAM J. Comput..

[17]  Robert E. Tarjan,et al.  Efficiency of a Good But Not Linear Set Union Algorithm , 1972, JACM.

[18]  Michael J. Fischer,et al.  Efficiency of Equivalence Algorithms , 1972, Complexity of Computer Computations.

[19]  S. Allesina,et al.  Secondary extinctions in ecological networks: Bottlenecks unveiled , 2006 .

[20]  Robert E. Tarjan,et al.  A data structure for dynamic trees , 1981, STOC '81.

[21]  Renato F. Werneck,et al.  On the Implementation of MST-Based Heuristics for the Steiner Problem in Graphs , 2002, ALENEX.

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

[23]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[24]  Donald E. Knuth,et al.  An empirical study of FORTRAN programs , 1971, Softw. Pract. Exp..

[25]  Michael Franz,et al.  Average case vs. worst case: margins of safety in system design , 2005, NSPW '05.

[26]  Haim Kaplan,et al.  A new, simpler linear-time dominators algorithm , 1998, TOPL.

[27]  Robert E. Tarjan,et al.  Linear-time algorithms for dominators and related problems , 2005 .

[28]  Henry D. Shapiro,et al.  An Empirical Assessment of Algorithms for Constructing a Minimum Spanning Tree , 1992, Computational Support for Discrete Mathematics.

[29]  Shirley Dex,et al.  JR 旅客販売総合システム(マルス)における運用及び管理について , 1991 .

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

[31]  Robert E. Tarjan,et al.  Applications of Path Compression on Balanced Trees , 1979, JACM.

[32]  Paul Walton Purdom,et al.  Immediate Predominators in a Directed Graph [H] (Algorithm 430) , 1972, Commun. ACM.

[33]  Andrew V. Goldberg,et al.  Shortest Path Algorithms: Engineering Aspects , 2001, ISAAC.

[34]  Micha Sharir,et al.  Structural Analysis: A New Approach to Flow Analysis in Optimizing Compilers , 2015 .

[35]  Alfred V. Aho,et al.  Principles of Compiler Design , 1977 .

[36]  Robert E. Tarjan,et al.  Finding Dominators Revisited , 2004, SODA 2004.

[37]  Harold N. Gabow,et al.  Data structures for weighted matching and nearest common ancestors with linking , 1990, SODA '90.

[38]  Ken Kennedy,et al.  Iterative Data-flow Analysis , Revisited , 2003 .

[39]  Stefano Allesina,et al.  Who dominates whom in the ecosystem? Energy flow bottlenecks and cascading extinctions. , 2004, Journal of theoretical biology.