Skip to main content

Finding Dominators in Practice

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3221))

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. The IMPACT compiler, http://www.crhc.uiuc.edu/IMPACT

  2. The Standard Performance Evaluation Corp., http://www.spec.org/

  3. Aho, V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading (1986)

    Google Scholar 

  4. Aho, V., Ullman, J.D.: Principles of Compilers Design. Addison-Wesley, Reading (1977)

    Google Scholar 

  5. 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)

    Google Scholar 

  6. Alstrup, S., Harel, D., Lauridsen, P.W., Thorup, M.: Dominators in linear time. SIAM Journal on Computing 28(6), 2117–2132 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  7. 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)

    Google Scholar 

  8. 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

    Google Scholar 

  9. 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

  10. 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)

    Article  Google Scholar 

  11. 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)

    Google Scholar 

  12. Georgiadis, L., Tarjan, R.E.: Finding dominators revisited. In: Proc. 15th ACM-SIAM Symp. on Discrete Algorithms, pp. 862–871 (2004)

    Google Scholar 

  13. Hecht, M.S., Ullman, J.D.: Characterizations of reducible flow graphs. Journal of the ACM 21(3), 367–375 (1974)

    Article  MATH  MathSciNet  Google Scholar 

  14. Holloway, G., Young, C.: The flow analysis and transformation libraries of Machine SUIF. In: Proceedings of the 2nd SUIF Compiler Workshop (1997)

    Google Scholar 

  15. Kam, J.B., Ullman, J.D.: Global data flow analysis and iterative algorithms. Journal of the ACM 23, 158–171 (1976)

    Article  MATH  MathSciNet  Google Scholar 

  16. Knuth, D.E.: An empirical study of FORTRAN programs. Software Practice and Experience 1, 105–133 (1971)

    Article  MATH  Google Scholar 

  17. 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)

    Article  MATH  Google Scholar 

  18. Purdom Jr., P.W., Moore, E.F.: Algorithm 430: Immediate predominators in a directed graph. Communications of the ACM 15(8), 777–778 (1972)

    Article  Google Scholar 

  19. 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)

    Google Scholar 

  20. Sharir, M.: Structural analysis: A new approach to flow analysis in optimizing compilers, vol. 5, pp. 141–153 (1980)

    Google Scholar 

  21. Sleator, D.D., Tarjan, R.E.: A data structure for dynamic trees. Journal of Computer and System Sciences 26, 362–391 (1983)

    Article  MATH  MathSciNet  Google Scholar 

  22. 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)

    Google Scholar 

  23. Tarjan, R.E.: Finding dominators in directed graphs. SIAM Journal on Computing 3(1), 62–89 (1974)

    Article  MATH  MathSciNet  Google Scholar 

  24. Tarjan, R.E.: Applications of path compression on balanced trees. Journal of the ACM 26(4), 690–715 (1979)

    Article  MATH  MathSciNet  Google Scholar 

  25. Tarjan, R.E., van Leeuwen, J.: Worst-case analysis of set union algorithms. Journal of the ACM 31(2), 245–281 (1984)

    Article  MATH  Google Scholar 

  26. The CAD Benchmarking Lab, North Carolina State University. ISCAS 1989 benchmark information, http://www.cbl.ncsu.edu/www/CBL_Docs/iscas89.html

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics