Skip to main content
Log in

Simplifying Control Flow in Compiler-Generated Parallel Code

  • Published:
International Journal of Parallel Programming Aims and scope Submit manuscript

Abstract

Optimizing compilers for data-parallel languages such as High Performance Fortran perform a complex sequence of transformations. However, the effects of many transformations are not independent, which makes it challenging to generate high quality code. In particular, some transformations introduce conditional control flow, while others make some conditionals unnecessary by refining program context. Eliminating unnecessary conditional control flow during compilation can reduce code size and remove a source of overhead in the generated code. This paper describes algorithms to compute symbolic constraints on the values of expressions used in control predicates and to use these constraints to identify and remove unnecessary conditional control flow. These algorithms have been implemented in the Rice dHPF compiler and we show that these algorithms are effective in reducing the number of conditionals and the overall size of generated code. Finally, we describe a synergy between control flow simplification and data-parallel code generation based on loop splitting which achieves the effects of more narrow data-parallel compiler optimizations such as vector message pipelining and the use of overlap areas.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Similar content being viewed by others

REFERENCES

  1. High Performance Fortran Forum, High Performance Fortran Language Specification, Sci. Progr., 2(1–2):1–170 (1993).

  2. ANSI X3J3/S8.115, Fortran 90 (June 1990).

  3. Vikram Adve and John Mellor-Crummey, Using Integer Sets for Data-Parallel Program Analysis and Optimization, Proc. SIGPLAN '98 Conf. on Progr. Lang. Design and Implementation, Montreal, Canada (June 1998).

  4. A. Rogers and K. Pingali, Process Decomposition Through Locality of Reference, Proc. SIGPLAN '89 Conf. Progr. Lang. Design and Implementation, Portland, Oregon (June 1989).

  5. François Bourdoncle, Abstract Debugging of Higher-Order Imperative Languages, Proc. SIGPLAN '93 Conf. Progr. Lang. Design and Implementation, pp. 46–55 (June 1993).

  6. Harold Johnson, Dataflow Analysis of ``Intractable'' Imbedded System Software, Proc. SIGPLAN '86 Symp. Compiler Construction, pp. 109–117 (1986).

  7. W. H. Harrison, Compiler Analysis of the Value Ranges for Variables, IEEE Trans. Software Engin., SE-3(3):243–250 (May 1977).

    Google Scholar 

  8. Priyadarshan Kolte and Michael Wolfe, Elimination of Redundant Array Subscript Range Checks, ACM SIGPLAN '95 Conf. Progr. Lang. Design and Implementation, La Jolla, California, pp. 270–278 (June 1995).

  9. W. Blume and R. Eigenmann, Demand-Driven Symbolic Range Propagation, Proc. Eighth Workshop Lang. and Compilers for Parallel Computing, Columbus, Ohio, pp. 141–160 (August 1995).

  10. Peng Tu and David Padua, Gated SSA-Based Demand-Driven Symbolic Analysis for Parallelizing Compilers, Proc. 1995 ACM Int'l. Conf. Supercomputing, Barcelona, Spain (July 1995).

  11. Preston Briggs, Linda Torczon, and Keith D. Cooper, Using Conditional Branches to Improve Constant Propagation, Technical Report CRPC-TR95533, Center for Research on Parallel Computation, Rice University (April 1995).

  12. Paul Havlak, Interprocedural Symbolic Analysis, Ph.D. thesis, Department of Computer Science, Rice University (May 1994). Also available as CRPC-TR94451 from the Center for Research on Parallel Computation and CS-TR94–228 from the Rice Department of Computer Science.

  13. C.-W. Tseng, An Optimizing Fortran D Compiler for MIMD Distributed-Memory Machines. Ph.D. thesis, Department of Computer Science, Rice University (January 1993).

  14. M. Gerndt, Updating Distributed Variables in Local Computations, Concurrency: Practice and Experience, 2(3):171–193 (September 1990).

    Google Scholar 

  15. Vikram Adve and John Mellor-Crummey, Advanced Code Generation for High Performance Fortran, Languages, Compilation Techniques and Run Time Systems for Scalable Parallel Systems, Lecture Notes in Computer Science Series. Springer-Verlag ( to appear). Available as Technical Report CS-TR-98–324, Computer Science Department, Rice University (September 1998).

  16. C. Koelbel and P. Mehrotra, Compiling Global Name-Space Parallel Loops for Distributed Execution, IEEE Trans. Parallel and Distrib. Syst., 2(4):440–451 (October 1991).

    Google Scholar 

  17. Z. Bozkus, L. Meadows, S. Nakamoto, V. Schuster, and M. Young, Compiling High Performance Fortran, Proc. Seventh SIAM Conf. Parallel Processing for Sci. Comput., pp. 704–709, San Francisco, California (February 1995).

  18. M. Gupta, S. Midkiff, E. Schonberg, V. Seshadri, D. Shields, K. Wang, W. Ching, and T. Ngo, An HPF Compiler for the IBM SP2, Proc. Supercomputing ' 95, San Diego, California (December 1995).

  19. R. Cytron, J. Ferrante, B. Rosen, M. Wegman, and K. Zadeck, Efficiently Computing Static Single Assignment Form and the Control Dependence Graph, ACM Trans. Progr. Lang. Syst., 13(4):451–490 (October 1991).

    Google Scholar 

  20. Wayne Kelly, Vadim Maslov, William Pugh, Evan Rosser, Tatiana Shpeisman, and David Wonnacott, The Omega Library Interface Guide, Technical Report, Department of Computer Science, University of Maryland, College Park (April 1996).

  21. W. Pugh, A Practical Algorithm for Exact Array Dependence Analysis, Comm. ACM, 35(8):102–114 (August 1992).

    Google Scholar 

  22. W. Kelly, W. Pugh, and E. Rosser, Code Generation for Multiple Mappings, Frontiers '95: The Fifth Symp. of Massively Parallel Computation, McLean, Virginia (February 1995).

  23. R. E. Tarjan, Testing Flow Graph Reducibility, J. Comput. Syst. Sci. 9:355–365 (1974).

    Google Scholar 

  24. Marc Snir, Steve W. Otto, Steven Huss-Lederman, David W. Walker, and Jack Dongarra, MPI: The Complete Reference, MIT Press (1995).

  25. Rastislav Bodik, Rajiv Gupta, and Mary Lou Soffa, Interprocedural Conditional Branch Elimination, ACM SIGPLAN '97 Conf. Progr. Lang. Design and Implementation, Las Vegas, Nevada (June 1997).

  26. Frank Mueller and David B. Whalley, Avoiding Conditional Branches by Code Replication, ACM SIGPLAN '95 Conf. Progr. Lang. Design and Implementation, La Jolla, California, pp. 56–66 ( June 1995).

  27. D. Bailey, Tim Harris, William Saphir, Rob van der Wijngaart, Alex Woo, and Maurice Yarrow, The NAS parallel benchmarks 2.0, Technical Report NAS-95–020, NASA Ames Research Center (December 1995).

Download references

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Mellor-Crummey, J., Adve, V. Simplifying Control Flow in Compiler-Generated Parallel Code. International Journal of Parallel Programming 26, 613–638 (1998). https://doi.org/10.1023/A:1018776615791

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/A:1018776615791

Navigation