skip to main content
article
Free Access

A practical interprocedural dominance algorithm

Published:01 August 2007Publication History
Skip Abstract Section

Abstract

Existing algorithms for computing dominators are formulated for control flow graphs of single procedures. With the rise of computing power, and the viability of whole-program analyses and optimizations, there is a growing need to extend the dominator computation algorithms to context-sensitive interprocedural dominators. Because the transitive reduction of the interprocedural dominator graph is not a tree, as in the intraprocedural case, it is not possible to extend existing algorithms directly. In this article, we propose a new algorithm for computing interprocedural dominators. Although the theoretical complexity of this new algorithm is as high as that of a straightforward iterative solution of the data flow equations, our experimental evaluation demonstrates that the algorithm is practically viable, even for programs consisting of several hundred thousands of basic blocks.

References

  1. Agrawal, H. 1999. Efficient coverage testing using global dominator graphs. In Proceedings of the 1999 ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering (PASTE'99). 11--20. Google ScholarGoogle Scholar
  2. Aho, A. V. and Ullman, J. D. 1977. Principles of Compiler Design. Addison-Wesley, Reading, MA. Google ScholarGoogle Scholar
  3. Allen, F. E. 1970. Control flow analysis. In Proceedings of a Symposium on Compiler Optimization. ACM Press, New York, 1--19. Google ScholarGoogle Scholar
  4. Allen, F. E. and Cocke, J. 1972. Graph-theoretic constructs for program control flow analysis. Tech. Rep. RC 3923, IBM T.J. Watson Research Center.Google ScholarGoogle Scholar
  5. Alstrup, S., Harel, D., Lauridsen, P. W., and Thorup, M. 1999. Dominators in linear time. SIAM J. Comput. 28, 6, 2117--2132. Google ScholarGoogle Scholar
  6. Chanet, D., De Sutter, B., De Bus, B., Van Put, L., and De Bosschere, K. 2007. Automated reduction of the memory footprint of the linux kernel. ACM Trans. Embedded Comp. Syst. 6, 1 (Feb.). Google ScholarGoogle Scholar
  7. Cooper, K. D., Harvey, T. J., and Kennedy, K. 2001. A simple, fast dominance algorithm. Available on-line at: http://www.hipersoft.rice.edu/grads/publications/dom14.pdf.Google ScholarGoogle Scholar
  8. Cytron, R., Ferrante, J., Rosen, B. K., Wegman, M. N., and Zadeck, F. K. 1991. Efficiently computing static single assignment form and the control dependence graph. ACM Trans. Prog. Lang. Syst. 13, 4, 451--490. Google ScholarGoogle Scholar
  9. De Bus, B., De Sutter, B., Van Put, L., Chanet, D., and De Bosschere, K. 2004. Link-time optimization of ARM binaries. SIGPLAN Notices 39, 7, 211--220. Google ScholarGoogle Scholar
  10. De Sutter, B., De Bus, B., and De Bosschere, K. 2005. Link-time binary rewriting techniques for program compaction. ACM Trans. Prog. Lang. Syst. 27, 5 (Sept.), 882--945. Google ScholarGoogle Scholar
  11. Georgiadis, L. and Tarjan, R. E. 2004. Finding dominators revisited: extended abstract. In Proceedings of the fifteenth annual ACM-SIAM symposium on Discrete Algorithms. 869--878. Google ScholarGoogle Scholar
  12. Georgiadis, L., Werneck, R., Tarjan, R., Triantafyllis, S., and August, D. 2004. Finding dominators in practice. Lecture Notes in Computer Science 3221, 677--688.Google ScholarGoogle Scholar
  13. Harel, D. 1985. A linear algorithm for finding dominators in flow graphs and related problems. In Proceedings of the 17th Annual ACM Symposium on Theory of Computing. ACM Press, 185--194. Google ScholarGoogle Scholar
  14. Lengauer, T. and Tarjan, R. E. 1979. A fast algorithm for finding dominators in a flowgraph. ACM Trans. Program. Lang. Syst. 1, 1, 121--141. Google ScholarGoogle Scholar
  15. Lowry, E. S. and Medlock, C. W. 1969. Object code optimization. Comm. ACM 12, 1, 13--22. Google ScholarGoogle Scholar
  16. Muth, R., Debray, S. K., Watterson, S. A., and De Bosschere, K. 2001. alto: a link-time optimizer for the compaq alpha. Software---Practice and Experience 31, 1, 67--101. Google ScholarGoogle Scholar
  17. Prosser, R. T. 1959. Applications of Boolean matrices to the analysis of flow diagrams. In Proceedings of the Eastern Joint Computer Conference. Spartan Books, New York, 133--138.Google ScholarGoogle Scholar
  18. Purdom, P. W. and Moore, E. F. 1972. Immediate predominators in a directed graph {H}. Comm. ACM 15, 8, 777--778. Google ScholarGoogle Scholar
  19. Ramalingam, G. 2002. On loops, dominators, and dominance frontiers. ACM Trans. Program. Lang. Syst. 24, 5, 455--490. Google ScholarGoogle Scholar
  20. Triantafyllis, S., Bridges, M., Raman, E., Ottoni, G., and August, D. 2006. A framework for unrestricted whole-program optimization. In PLDI '06: Proceedings of the 2006 ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, New York, NY, 61--71. Google ScholarGoogle Scholar
  21. Wall, D. W. 1986. Global register allocation at link time. In SIGPLAN '86: Proceedings of the 1986 SIGPLAN Symposium on Compiler construction. ACM Press, New York, NY, 264--275. Google ScholarGoogle Scholar

Index Terms

  1. A practical interprocedural dominance algorithm

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!