Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Fast condensation of the program dependence graph

Published: 16 June 2013 Publication History

Abstract

Aggressive compiler optimizations are formulated around the Program Dependence Graph (PDG). Many techniques, including loop fission and parallelization are concerned primarily with dependence cycles in the PDG. The Directed Acyclic Graph of Strongly Connected Components (DAGSCC) represents these cycles directly. The naive method to construct the DAGSCC first computes the full PDG. This approach limits adoption of aggressive optimizations because the number of analysis queries grows quadratically with program size, making DAGSCC construction expensive. Consequently, compilers optimize small scopes with weaker but faster analyses.
We observe that many PDG edges do not affect the DAGSCC and that ignoring them cannot affect clients of the DAGSCC. Exploiting this insight, we present an algorithm to omit those analysis queries to compute the DAGSCC efficiently. Across 366 hot loops from 20 SPEC2006 benchmarks, this method computes the DAGSCC in half of the time using half as many queries.

References

[1]
R. Allen and S. Johnson. Compiling C for vectorization, parallelization, and inline expansion. In Proceedings of the ACM SIGPLAN 1988 Conference on Programming Language Design and Implementation (PLDI), pages 241--249, June 1988.
[2]
U. Banerjee. Loop Transformations for Restructuring Compilers: The Foundations. Kluwer Academic Publishers, Norwell, MA, 1993.
[3]
T. Chen, J. Lin, W. Hsu, and P. Yew. An empirical study on the granularity of pointer analysis in C programs. Languages and Compilers for Parallel Computing (LCPC), pages 157--171, 2005.
[4]
R. Cytron. DOACROSS: Beyond vectorization for multiprocessors. In Proceedings of the 1986 International Conference on Parallel Processing (ICPP), pages 836--884, 1986.
[5]
E. Duesterwald, R. Gupta, and M. L. Soffa. Reducing the cost of data flow analysis by congruence partitioning. In In International Conference on Compiler Construction, pages 357--373. Springer-Verlag, 1994.
[6]
J. Ferrante, K. J. Ottenstein, and J. D. Warren. The program dependence graph and its use in optimization. ACM Transactions on Programming Languages and Systems, 9:319--349, July 1987.
[7]
J. S. Foster, M. Fähndrich, and A. Aiken. Polymorphic versus monomorphic flow-insensitive points-to analysis for C. In Proceedings of the 7th International Symposium on Static Analysis (SAS), pages 175--198, London, UK, UK, 2000. Springer-Verlag.
[8]
R. Ghiya, D. Lavery, and D. Sehr. On the importance of points-to analysis and other memory disambiguation methods for C programs. In Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation (PLDI), pages 47--58. ACM Press, 2001.
[9]
B. Guo, M. J. Bridges, S. Triantafyllis, G. Ottoni, E. Raman, and D. I. August. Practical and accurate low-level pointer analysis. In Proceedings of the 3rd International Symposium on Code Generation and Optimization (CGO), March 2005.
[10]
S. Z. Guyer and C. Lin. Client-driven pointer analysis. In In International Static Analysis Symposium, pages 214--236. Springer-Verlag, 2003.
[11]
R. E. Hank,W.W. Hwu, and B. R. Rau. Region-based compilation: An introduction and motivation. In Proceedings of the 28th Annual International Symposium on Microarchitecture, pages 158--168, December 1995.
[12]
M. J. Harrold, B. Malloy, and G. Rothermel. Efficient construction of Program Dependence Graphs. In Proceedings of the 1993 ACM SIGSOFT international symposium on Software testing and analysis (ISSTA), pages 160--170, New York, NY, 1993.
[13]
N. Heintze and O. Tardieu. Demand-driven pointer analysis. In Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation (PLDI), pages 24--34, New York, NY, 2001.
[14]
M. Hind. Pointer analysis: Haven't we solved this problem yet? In 2001 ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering (PASTE), 2001.
[15]
M. Hind and A. Pioli. Evaluating the effectiveness of pointer alias analyses. In Science of Computer Programming, pages 31--55, 1999.
[16]
S. Horwitz. Precise flow-insensitive may-alias analysis is NP-hard. ACM Transactions on Programming Languages and Systems, 19(1), January 1997.
[17]
S. Horwitz and T. Reps. The use of program dependence graphs in software engineering. In In proceedings of the Fourtheenth International Conference on Software Engineering (CSE), pages 392--411, 1992.
[18]
R. Johnson and K. Pingali. Dependence-based program analysis. In Proceedings of the SIGPLAN '93 Conference on Programming Language Design and Implementation (PLDI), pages 78--89, 1993.
[19]
M. G. Kendall. Rank Correlation Methods. Charles Griffin and Company, Limited, London, 1948.
[20]
K. Kennedy and J. R. Allen. Optimizing compilers for modern architectures: a dependence-based approach. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2002.
[21]
C. Lattner and V. Adve. LLVM: A compilation framework for lifelong program analysis & transformation. In Proceedings of the Annual International Symposium on Code Generation and Optimization (CGO), pages 75--86, 2004.
[22]
C. Lattner, A. Lenharth, and V. Adve. Making Context-Sensitive Points-to Analysis with Heap Cloning Practical For The Real World. In Proceedings of the 2007 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), San Diego, California, June 2007.
[23]
P. Liang and M. Naik. Scaling abstraction refinement via pruning. In Proceedings of the 2011 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI).
[24]
W. Liu, J. Tuck, L. Ceze, W. Ahn, K. Strauss, J. Renau, and J. Torrellas. POSH: a TLS compiler that exploits program structure. In PPoPP '06: Proceedings of the 11th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 158--167, 2006.
[25]
R. Muth and S. Debray. Partial inlining. Technical report, Department of Computer Science, University of Arizona, 1997.
[26]
R. Muth and S. Debray. On the complexity of flow-sensitive dataflow analyses. In In Proc. ACM Symp. on Principles of Programming Languages, pages 67--80. ACM Press, 2000.
[27]
F. Ohata, A. Nishimatsu, and K. Inoue. Analyzing dependence locality for efficient construction of program dependence graph. Information and Software Technology, 42(13):935--946, 2000.
[28]
E. Raman, G. Ottoni, A. Raman, M. Bridges, and D. I. August. Parallel-stage decoupled software pipelining. In Proceedings of the Annual International Symposium on Code Generation and Optimization (CGO), 2008.
[29]
R. Rangan, N. Vachharajani, M. Vachharajani, and D. I. August. Decoupled software pipelining with the synchronization array. In Proceedings of the 13th International Conference on Parallel Architectures and Compilation Techniques (PACT), pages 177--188, September 2004.
[30]
L. Rauchwerger and D. A. Padua. The LRPD test: Speculative runtime parallelization of loops with privatization and reduction parallelization. IEEE Transactions on Parallel Distributed Systems, 10:160--180, February 1999.
[31]
Standard Performance Evaluation Corporation. http://www.spec.org.
[32]
M. Sridharan, D. Gopan, L. Shan, and R. Bodík. Demand-driven points-to analysis for java. In Proceedings of the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications (OOPSLA), pages 59--76, New York, NY, 2005.
[33]
R. E. Tarjan. Depth-first search and linear graph algorithms. SIAM Journal on Computing, 1(2):146--160, 1972.
[34]
A. J. Thadhani. Factors affecting programmer productivity during application development. IBM Systems Journal, 23(1):19--35, 1984.
[35]
C. Tian, M. Feng, V. Nagarajan, and R. Gupta. Copy or discard execution model for speculative parallelization on multicores. In Proceedings of the 41st Annual IEEE/ACM International Symposium on Microarchitecture (MICRO), pages 330--341, Washington, DC, 2008. IEEE Computer Society.
[36]
H. Vandierendonck, S. Rul, and K. De Bosschere. The Paralax infrastructure: Automatic parallelization with a helping hand. In Proceedings of the 19th International Conference on Parallel Architecture and Compilation Techniques (PACT), pages 389--400, 2010.
[37]
M. Weiser. Program slicing. In Proceedings of the 5th international conference on Software engineering, (ICSE), pages 439--449, Piscataway, NJ, 1981.
[38]
J. Whaley and M. S. Lam. Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In Proceedings of the ACM SIGPLAN 2004 conference on Programming language design and implementation, (PLDI), pages 131--144, New York, NY, 2004.
[39]
The Wisconsin Program-Slicing Tool, Version 1.1, 2000. http://research.cs.wisc.edu/wpis/slicing tool/.
[40]
X. Zheng and R. Rugina. Demand-driven alias analysis for C. In Proceedings of the 35th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pages 197--208, New York, NY, 2008.

Index Terms

  1. Fast condensation of the program dependence graph

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 48, Issue 6
    PLDI '13
    June 2013
    515 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2499370
    Issue’s Table of Contents
    • cover image ACM Conferences
      PLDI '13: Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation
      June 2013
      546 pages
      ISBN:9781450320146
      DOI:10.1145/2491956
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 16 June 2013
    Published in SIGPLAN Volume 48, Issue 6

    Check for updates

    Author Tags

    1. demand-driven analysis
    2. dependence analysis
    3. program dependence graph (pdg)
    4. strongly-connected components (scc)

    Qualifiers

    • Research-article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)27
    • Downloads (Last 6 weeks)3
    Reflects downloads up to 03 Feb 2025

    Other Metrics

    Citations

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media