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.
L. Georgiadis, R.F. Werneck and R.E. Tarjan partially supported by the Aladdin project, NSF Grant No. CCR-9626862.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
The IMPACT compiler, http://www.crhc.uiuc.edu/IMPACT
The Standard Performance Evaluation Corp., http://www.spec.org/
Aho, V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading (1986)
Aho, V., Ullman, J.D.: Principles of Compilers Design. Addison-Wesley, Reading (1977)
Allen, F.E., Cocke, J.: Graph theoretic constructs for program control flow analysis. Technical Report IBM Res. Rep. RC 3923, IBM T.J. Watson Research Center (1972)
Alstrup, S., Harel, D., Lauridsen, P.W., Thorup, M.: Dominators in linear time. SIAM Journal on Computing 28(6), 2117–2132 (1999)
Amyeen, M.E., Fuchs, W.K., Pomeranz, I., Boppana, V.: Fault equivalence identification using redundancy information and static and dynamic extraction. In: Proceedings of the 19th IEEE VLSI Test Symposium (March 2001)
Buchsbaum, L., Kaplan, H., Rogers, A., Westbrook, J.R.: A new, simpler linear-time dominators algorithm. ACM Transactions on Programming Languages and Systems 20(6), 1265–1296 (1998) Corrigendum to appear
Cooper, K.D., Harvey, T.J., Kennedy, K.: A simple, fast dominance algorithm. Available online at http://www.cs.rice.edu/~keith/EMBED/dom.pdf
Cytron, R., Ferrante, J., Rosen, B.K., Wegman, M.N., Zadeck, F.K.: Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems 13(4), 451–490 (1991)
Gabow, H.N.: Data structures for weighted matching and nearest common ancestors with linking. In: Proceedings of the first annual ACM-SIAM symposium on Discrete algorithms, pp. 434–443 (1990)
Georgiadis, L., Tarjan, R.E.: Finding dominators revisited. In: Proc. 15th ACM-SIAM Symp. on Discrete Algorithms, pp. 862–871 (2004)
Hecht, M.S., Ullman, J.D.: Characterizations of reducible flow graphs. Journal of the ACM 21(3), 367–375 (1974)
Holloway, G., Young, C.: The flow analysis and transformation libraries of Machine SUIF. In: Proceedings of the 2nd SUIF Compiler Workshop (1997)
Kam, J.B., Ullman, J.D.: Global data flow analysis and iterative algorithms. Journal of the ACM 23, 158–171 (1976)
Knuth, D.E.: An empirical study of FORTRAN programs. Software Practice and Experience 1, 105–133 (1971)
Lengauer, T., Tarjan, R.E.: A fast algorithm for finding dominators in a flowgraph. ACM Transactions on Programming Languages and Systems 1(1), 121–141 (1979)
Purdom Jr., P.W., Moore, E.F.: Algorithm 430: Immediate predominators in a directed graph. Communications of the ACM 15(8), 777–778 (1972)
Ramalingam, G., Reps, T.: An incremental algorithm for maintaining the dominator tree of a reducible flowgraph. In: Proceedings of the 21st ACM SIGPLANSIGACT symposium on Principles of programming languages, pp. 287–296 (1994)
Sharir, M.: Structural analysis: A new approach to flow analysis in optimizing compilers, vol. 5, pp. 141–153 (1980)
Sleator, D.D., Tarjan, R.E.: A data structure for dynamic trees. Journal of Computer and System Sciences 26, 362–391 (1983)
Sweany, P.H., Beaty, S.J.: Dominator-path scheduling: A global scheduling method. In: Proceedings of the 25th International Symposium on Microarchitecture, pp. 260–263 (1992)
Tarjan, R.E.: Finding dominators in directed graphs. SIAM Journal on Computing 3(1), 62–89 (1974)
Tarjan, R.E.: Applications of path compression on balanced trees. Journal of the ACM 26(4), 690–715 (1979)
Tarjan, R.E., van Leeuwen, J.: Worst-case analysis of set union algorithms. Journal of the ACM 31(2), 245–281 (1984)
The CAD Benchmarking Lab, North Carolina State University. ISCAS 1989 benchmark information, http://www.cbl.ncsu.edu/www/CBL_Docs/iscas89.html
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Georgiadis, L., Werneck, R.F., Tarjan, R.E., Triantafyllis, S., August, D.I. (2004). Finding Dominators in Practice. In: Albers, S., Radzik, T. (eds) Algorithms – ESA 2004. ESA 2004. Lecture Notes in Computer Science, vol 3221. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30140-0_60
Download citation
DOI: https://doi.org/10.1007/978-3-540-30140-0_60
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-23025-0
Online ISBN: 978-3-540-30140-0
eBook Packages: Springer Book Archive