International Journal of Parallel Programming

, Volume 26, Issue 5, pp 563–589 | Cite as

A Constant Propagation Algorithm for Explicitly Parallel Programs

  • Jaejin Lee
  • Samuel P. Midkiff
  • David A. Padua
Article

Abstract

In this paper, we present a constant propagation algorithm for explicitly parallel programs, which we call the Concurrent Sparse Conditional Constant propagation algorithm. This algorithm is an extension of the Sparse Conditional Constant propagation algorithm. Without considering the interaction between threads, classical optimizations lead to an incorrect program transformation for parallel programs. To make analyzing parallel programs possible, a new intermediate representation is needed. We introduce the Concurrent Static Single Assignment (CSSA) form to represent explicitly parallel programs with interleaving semantics and synchronization. The only parallel construct considered in this paper is cobegin/coend. A new confluence function, the π-assignment, which summarizes the information of interleaving statements between threads, is introduced. The Concurrent Control Flow Graph, which contains information about conflicting statements, control flow, and synchronization, is used as an underlying representation for the CSSA from.

COMPILER OPTIMIZATION CONSTANT PROPAGATION CONTROL FLOW GRAPH EXPLICIT PARALLELISM INTERMEDIATE REPRESENTATION STATIC SINGLE ASSIGNMENT FORM 

REFERENCES

  1. 1.
    Jaejin Lee, Samuel P. Midkiff, and David A. Padua, Concurrent Static Single Assignment Form and Constant Propagation for Explicitly Parallel Programs, Proc. Tenth Int' l Workshop on Lang. Compilers for Parallel Computing (August 1997).Google Scholar
  2. 2.
    S. P. Midkiff and D. A. Padua, Issues in the Optimization of Parallel Programs, Proc. Int' l Conf. Parallel Processing, Vol. II Software, pp. 105–113 (August 1990).Google Scholar
  3. 3.
    Kourosh Gharachorloo, Memory Consistency Models for Shared-Memory Multiprocessors, Ph.D. thesis, Stanford University (1995).Google Scholar
  4. 4.
    Leslie Lamport, How to Make a Multiprocessor Computer that Correctly Executes Multiprocess Programs, IEEE Trans. Computers, C-28(9):690–691 (September 1979).Google Scholar
  5. 5.
    Mark M. Brandis and Hanspeter Mössenböck, Single-Pass Generation of Static Single Assignment Form for Structured Languages, ACM Trans. Progr. Lang. and Syst., 16(6):1684–1698 (1994).Google Scholar
  6. 6.
    Ron Cytron, Jeanne Ferrante, Barry K. Rosen, and Mark N. Wegman, Efficiently Computing Static Single Assignment Form and the Control Dependence Graph, ACM Trans. Progr. Lang. and Syst., 13(4):451–490 (October 1991).Google Scholar
  7. 7.
    Mark N. Wegman and F. Kenneth Zadeck, Constant Propagation with Conditional Branches, ACM Trans. Progr. Lang. Syst., 13(2):181–210 (April 1991).Google Scholar
  8. 8.
    Barry K. Rosen, Mark N. Wegman, and F. Kenneth Zadeck, Gloabal Value Numbers and Redundant Computations, Conf. Record 15th ACM Symp. Principles of Progr. Lang., pp. 12–27 (January 1988).Google Scholar
  9. 9.
    Preston Briggs and Keith D. Cooper, Effective Partial redundancy Elimination, Proc. ACM SIGPLAN ' 94 Conf. Progr. Lang. Design and Implementation, pp. 159–170 (June 1994).Google Scholar
  10. 10.
    Michael P. Gerlek, Eric Stoltz, and Michael Wolfe, Beyond Induction Variables: Detecting and Classifying Sequences Using a Demand-Driven SSA Form, ACM Trans. Progr. Lang. and Syst., 17(1):85–122 (January 1995).Google Scholar
  11. 11.
    Harini Srinivasan and Dirk Grunwald, An Efficient Construction of Parallel Static Single Assignment Form for Structured Parallel Programs, Technical Report CU-CS-564–91, University of Colorado at Boulderi (December 1991).Google Scholar
  12. 12.
    Harini Srinivasan, James Hook, and Michael Wolfe, Static Single Assignment for Explicitly Parallel Programs, Proc. 20th ACM Symp. Principles of Progr. Lang., pp. 260–272 (January 1993).Google Scholar
  13. 13.
    Vivek Sarkar, Analysis and Optimization of Explicitly Parallel Programs Using the Parallel Program Graph Representation, Tenth Ann. Workshop on Lang. Compilers for Parallel Computing (August 1997).Google Scholar
  14. 14.
    Vivek Sarkar and Barbara Simons, Parallel Program Graphs and Their Classification, In Utpal Banerjee, David Gelernter, Alex Nicolau, and David Padua, (eds.), Sixth Ann. Workshop on Lang. Compilers for Parallel Computing, Volume 768 of Lecture Notes in Computer Science, Springer-Verlag (August 1993).Google Scholar
  15. 15.
    Michael Wolfe and Harini Srinivasan, Data Structures for Optimizing Programs with Explicit Parallelism, Proc. First Int'l Conf. Austrian Center for Parallel Computation (September 1991).Google Scholar
  16. 16.
    Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman, Compilers: Principles, Techniques, and Tools, Addison Wesley (1986).Google Scholar
  17. 17.
    David Callahan and Jaspal Subhlok, Static Analysis of Low-Level Synchronization, Proc. ACM SIGPLAN/SIGOPS Workshop on Parallel and Distributed Debugging, pp. 100–111 (May 1988.).Google Scholar
  18. 18.
    Perry A. Emrath, Sanjoy Ghosh, and David A. Padua, Event Synchronization Analysis for Debugging Parallel Programs, Proc. Supercomputing '89, pp. 580–588 (1989).Google Scholar
  19. 19.
    Perry A. Emrath, Sanjoy Ghosh, and David A. Padua, Detecting Nondeterminacy in Parallel Programs, IEEE Software, pp. 69–77 (January 1992).Google Scholar

Copyright information

© Plenum Publishing Corporation 1998

Authors and Affiliations

  • Jaejin Lee
  • Samuel P. Midkiff
  • David A. Padua

There are no affiliations available

Personalised recommendations