skip to main content
article
Free Access

What's in a region?: or computing control dependence regions in near-linear time for reducible control flow

Published:01 March 1993Publication History
Skip Abstract Section

Abstract

Regions of control dependence identify the instructions in a program that execute under the same control conditions. They have a variety of applications in parallelizing and optimizing compilers. Two vertices in a control-flow graph (which may represent instructions or basic blocks in a program) are in the same region if they have the same set of control dependence predecessors. The common algorithm for computing regions examines each control dependence at least once. As there may be O(V x E) control dependences in the worst case, where V and E are the number of vertices and edges in the control-flow graph, this algorithm has a worst-case running time of O(V x D). We present algorithms for finding regions in reducible control-flow graphs in near-linear time, without using control dependence. These algorithms are based on alternative definitions of regions, which are easier to reason with than the definitions based on control dependence.

References

  1. AHO, A., SETHI, R., AND ULLMAN, J. 1986. Compilers: Principles, Techniques and Tools. Addison-Wesley, Reading, MA. Google ScholarGoogle Scholar
  2. BERNSTEIN, D., AND RODEH, M. 1991. Global instruction scheduling for superscalar machines. In Proceedings of the ACM SIGPLAN "91 Conference on Programming Language Design and implementation. ACM SIGPLAN Not. 26, 6 (June), 241-255. Google ScholarGoogle Scholar
  3. CYTRON, R., FERRANTE, J., AND SARKAR, V. 1989. Experiences using control dependence in PTRAN. In Proceedings of the 2nd Workshop on Languages and Compilers for Parallel Computing (Aug.). Google ScholarGoogle Scholar
  4. CYTRON, R., FERRANTE, J., AND SARKAR, V. 1990. Compact representations for control dependence. In Proceedings of the ACM SIGPLAN '90 Conference on Programming Language Design and Implementation. ACM SIGPLAN Not. 25, 6 (June), 337-351. Google ScholarGoogle Scholar
  5. FERRANTE, J., OTTENSTEIN, K., AND WARREN, J. 1987. The program dependence graph and its use in optimization. ACM Trans. Program. Lang. Syst. 9, 5 (July), 319-349. Google ScholarGoogle Scholar
  6. GUPTA, R. 1992. Generalized dominators and post-dominators. In Conference Record of the 19th ACM Symposium on Principles of Programming Languages. ACM, New York, 246-257. Google ScholarGoogle Scholar
  7. HAREL, D. 1985. A linear time algorithm for finding dominators in flow graphs and related problems. In Proceedings of the 17th Annual ACM Symposium on Theory of Computing. ACM, New York, 185-194. Google ScholarGoogle Scholar
  8. HORWITZ, S., PRINS, J., AND REPS, T. 1989. Integrating noninterfering versions of programs. ACM Trans. Program. Lang. Syst. 11, 3 (July), 345-387. Google ScholarGoogle Scholar
  9. JOHNSON, R., PEARSON, D., AND PINGALI, K. 1993. Finding regions fast: Single exit and control regions in linear time. Tech. Rep. 93-1365, Dept. of Computer Science, Cornell Univ., Ithaca, N.Y. Google ScholarGoogle Scholar
  10. PODGURSKI, A. 1991. Forward control dependence, chain equivalence, and their preservation by reordering transformations. Tech. Rep. CES-91-18, Case Western Reserve Univ., Aug.Google ScholarGoogle Scholar
  11. SCHWARTZ, J. T. AND SHARIR, M. 1978. Tarjan's fast interval finding algorithm. SETL Newsletter No. 204, Courant Institute of Mathematical Sciences, New York Univ., New York, March 3, 1978.Google ScholarGoogle Scholar
  12. TARJAN, R. 1981. Fast algorithms for solving path problems. J. ACM 28, 3, 594-614. Google ScholarGoogle Scholar

Index Terms

  1. What's in a region?: or computing control dependence regions in near-linear time for reducible control flow

        Recommendations

        Reviews

        Benjamin Rayborn Seyfarth

        The author presents new definitions for weak and strong regions in a control-flow graph and presents nearly-linear-time algorithms for computing these regions. Computing strong regions is important in code scheduling, permitting movement of instructions across basic blocks (in the absence of data dependence problems) to vertices in the same strong region. Strong regions can also permit more efficient placement of profiling code, since only one counter is needed for each strong region. The author presents the definitions and algorithms clearly enough to understand and apply. His illustrations help immensely in understanding the paper. Following each algorithm, he proves its correctness. The paper's length is appropriate for the material. The author includes 12 carefully selected references, which should aid researchers in this area. Overall, the paper presents practical algorithms while covering all the pertinent theory gracefully.

        Access critical reviews of Computing literature here

        Become a reviewer for Computing Reviews.

        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

        • Published in

          cover image ACM Letters on Programming Languages and Systems
          ACM Letters on Programming Languages and Systems  Volume 2, Issue 1-4
          March–Dec. 1993
          241 pages
          ISSN:1057-4514
          EISSN:1557-7384
          DOI:10.1145/176454
          Issue’s Table of Contents

          Copyright © 1993 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 1 March 1993
          Published in loplas Volume 2, Issue 1-4

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • article

        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!