skip to main content
Article

A compiler framework for speculative analysis and optimizations

Published: 09 May 2003 Publication History

Abstract

Speculative execution, such as control speculation and data speculation, is an effective way to improve program performance. Using edge/path profile information or simple heuristic rules, existing compiler frameworks can adequately incorporate and exploit control speculation. However, very little has been done so far to allow existing compiler frameworks to incorporate and exploit data speculation effectively in various program transformations beyond instruction scheduling. This paper proposes a speculative SSA form to incorporate information from alias profiling and/or heuristic rules for data speculation, thus allowing existing program analysis frameworks to be easily extended to support both control and data speculation. Such a general framework is very useful for EPIC architectures that provide checking (such as advanced load address table (ALAT) [10]) on data speculation to guarantee the correctness of program execution. We use SSAPRE [21] as one example to illustrate how to incorporate data speculation in those important compiler optimizations such as partial redundancy elimination (PRE), register promotion, strength reduction and linear function test replacement. Our extended framework allows both control and data speculation to be performed on top of SSAPRE and, thus, enables more aggressive speculative optimizations. The proposed framework has been implemented on Intel's Open Research Compiler (ORC). We present experimental data on some SPEC2000 benchmark programs to demonstrate the usefulness of this framework and how data speculation benefits partial redundancy elimination.

References

[1]
T. Ball and J. Larus. Branch prediction for free. In Proceedings of the ACM SIGPLAN Symposium on Programming Language Design and Implementation, pages 300--313, June 1993.
[2]
R. Bodik, R. Gupta, and M. Soffa. Load-reuse analysis: design and evaluation, In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 64--76, Atlanta, Georgia, May 1999.
[3]
R. Bodík, R. Gupta, and M. Soffa. Complete removal of redundant expressions. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 1--14, Montreal, Canada, 17-19 June 1998.
[4]
T. Chen, J. Lin, W. Hsu, P.C. Yew. An Empirical Study on the Granularity of Pointer Analysis in C Programs, In 15th Workshop on Languages and Compilers for Parallel Computing, pages 151--160, College Park, Maryland, July 2002.
[5]
F. Chow, S. Chan, S. Liu, R. Lo, and M. Streich. Effective representation of aliases and indirect memory operations in SSA form. In Proceedings of the Sixth International Conference on Compiler Construction, pages 253--267, April 1996.
[6]
F. Chow, S. Chan, R. Kennedy, S. Liu, R. Lo, and P. Tu. A new algorithm for partial redundancy elimination based on SSA form. In Proceedings of the ACM SICPLAN Conference on Programming Language Design and Implementation, pages 273--286, Las Vegas, Nevada, May 1997.
[7]
R. Cytron, J. Ferrante, B. Rosen, M. Wegman, and K. Zadeck. Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems, 13(4): 451--490, 1991.
[8]
D. M. Dhamdhere. Practical Adaptation of the Global Optimization Algorithm of Morel and Renovise, ACM Trans. on Programming Languages and Systems, 13(2): 291--294, 1991.
[9]
A. Diwan, K. McKinley, and J. Moss. Type-based alias analysis, In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 106--117, Montreal, Canada, 17-19 June 1998.
[10]
C. Dulong. The IA-64 Architecture at Work, IEEE Computer, Vol. 31, No. 7, pages 24--32, July 1998.
[11]
C. Dulong, R. Krishnaiyer, D. Kulkarni, D. Lavery, W. Li, J. Ng, and D. Sehr. An overview of the Intel IA-64 compiler. Intel Technology Journal, November 1999.
[12]
M. Fernande, and R. Espasa. Speculative alias analysis for executable code, In Proceedings of International Conference on Parallel Architectures and Compilation Techniques, pages 222--231, Charlottesville, Virginia, Sept 2002.
[13]
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, pages 47--58, Snowbird, Utah, June 2001.
[14]
M. Hind. Pointer analysis: Haven't we solved this problem yet? In ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, pages 54--61, Snowbird, Utah, June 2001.
[15]
Y.-S. Hwang, P.-S. Chen, J.-K. Lee, and R. D.-C. Ju, Probabilistic Points-to Analysis, In Proceeding of the Workshop of Languages and Compilers for Parallel Computing, Aug. 2001.
[16]
R. D.-C. Ju, J. Collard, and K. Oukbir. Probabilistic Memory Disambiguation and its Application to Data Speculation, Computer Architecture News, Vol. 27, No.1, March 1999.
[17]
R. D.-C. Ju, K. Nomura, U. Mahadevan, and L.-C. Wu. A Unified Compiler Framework for Control and Data Speculation, In Proceedings of 2000 International Conf. on Parallel Architectures and Compilation Techniques, pages 157--168, Oct. 2000.
[18]
R. D.-C. Ju, S. Chan, and C. Wu. Open Research Compiler (ORC) for the Itanium Processor Family. Tutorial presented at Micro 34, 2001.
[19]
R. D.-C. Ju, S. Chan, F. Chow, and X. Feng. Open Research Compiler (ORC): Beyond Version 1.0, Tutorial presented at PACT 2002.
[20]
R. Kennedy, F. Chow, P. Dahl, S.-M. Liu, R. Lo, and M. Streich. Strength reduction via SSAPRE. In Proceedings of the Seventh International Conference on Compiler Construction, pages 144--158, Lisbon, Portugal, Apr. 1998.
[21]
R.Kennedy, S. Chan, S. Liu, R. Lo, P. Tu, and F. Chow. Partial Redundancy Elimination in SSA Form. ACM Trans. on Programming Languages and systems, v.21 n.3, pages 627--676, May 1999.
[22]
K. Knobe and V. Sarkar. Array SSA form and its use in parallelization. In Proceedings of ACM Symposium on Principles of Programming Languages, pages 107--120, San Diego, California, January 1998.
[23]
J. Knoop, O. Ruthing, and B. Steffen. Lazy code motion. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 224--234, San Francisco, California, June 1992.
[24]
J. Lin, T.Chen, W.C. Hsu, P.C. Yew, Speculative Register Promotion Using Advanced Load Address Table (ALAT), In Proceedings of First Annual IEEE/ACM International Symposium on Code Generation and Optimization, pages 125--134, San Francisco, California, March 2003
[25]
R. Lo, F. Chow, R. Kennedy, S. Liu, P. Tu, Register Promotion by Sparse Partial Redundancy Elimination of Loads and Stores, . In Proc. of the ACM SIGPLAN Conf. on Programming Language Design and Implementation, pages 26--37, Montreal, 1998
[26]
E. Morel and C. Renvoise. Global optimization by suppression of partial redundancies. Communications of the ACM, 22(2): 96--103, 1979.
[27]
pfmon: ftp://ftp.hpl.hp.com/pub/linux-ia64/pfmon-1.1-0.ia64.rpm
[28]
B. Steensgaard. Points-to analysis in almost linear time. In Proceedings of ACM Symposium on Principles of Programming Languages, pages 32--41, Jan. 1996.
[29]
R.P. Wilson and M.S. Lam. Efficient context-sensitive pointer analysis for C program. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages1--12, La Jolla, California, Jun 18-21, 1995.
[30]
Y. Wu and Y. Lee. Accurate Invalidation Profiling for Effective Data Speculation on EPIC processors, In 13th International Conference on Parallel and Distributed Computing Systems, Las Vegas, Nevada, Aug 2000.

Cited By

View all
  • (2023)Rapid: Region-Based Pointer DisambiguationProceedings of the ACM on Programming Languages10.1145/36228597:OOPSLA2(1729-1757)Online publication date: 16-Oct-2023
  • (2022)The road not taken: exploring alias analysis based optimizations missed by the compilerProceedings of the ACM on Programming Languages10.1145/35633166:OOPSLA2(786-810)Online publication date: 31-Oct-2022
  • (2020)SCAF: a speculation-aware collaborative dependence analysis frameworkProceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3385412.3386028(638-654)Online publication date: 11-Jun-2020
  • Show More Cited By

Index Terms

  1. A compiler framework for speculative analysis and optimizations

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    PLDI '03: Proceedings of the ACM SIGPLAN 2003 conference on Programming language design and implementation
    June 2003
    360 pages
    ISBN:1581136625
    DOI:10.1145/781131
    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]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 09 May 2003

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. data speculation
    2. partial redundancy elimination
    3. register promotion
    4. speculative SSA form
    5. speculative weak update

    Qualifiers

    • Article

    Conference

    PLDI03
    Sponsor:

    Acceptance Rates

    PLDI '03 Paper Acceptance Rate 28 of 131 submissions, 21%;
    Overall Acceptance Rate 406 of 2,067 submissions, 20%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)11
    • Downloads (Last 6 weeks)2
    Reflects downloads up to 21 Oct 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)Rapid: Region-Based Pointer DisambiguationProceedings of the ACM on Programming Languages10.1145/36228597:OOPSLA2(1729-1757)Online publication date: 16-Oct-2023
    • (2022)The road not taken: exploring alias analysis based optimizations missed by the compilerProceedings of the ACM on Programming Languages10.1145/35633166:OOPSLA2(786-810)Online publication date: 31-Oct-2022
    • (2020)SCAF: a speculation-aware collaborative dependence analysis frameworkProceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3385412.3386028(638-654)Online publication date: 11-Jun-2020
    • (2020)HARPProceedings of the ACM/IEEE 42nd International Conference on Software Engineering10.1145/3377811.3380434(506-517)Online publication date: 27-Jun-2020
    • (2018)Fast-path loop unrolling of non-counted loops to enable subsequent compiler optimizationsProceedings of the 15th International Conference on Managed Languages & Runtimes10.1145/3237009.3237013(1-13)Online publication date: 12-Sep-2018
    • (2016)Decoupling loads for nano-instruction set computersACM SIGARCH Computer Architecture News10.1145/3007787.300118144:3(406-417)Online publication date: 18-Jun-2016
    • (2016)Decoupling loads for nano-instruction set computersProceedings of the 43rd International Symposium on Computer Architecture10.1109/ISCA.2016.43(406-417)Online publication date: 18-Jun-2016
    • (2015)Data-dependence profiling to enable safe thread level speculationProceedings of the 25th Annual International Conference on Computer Science and Software Engineering10.5555/2886444.2886459(91-100)Online publication date: 2-Nov-2015
    • (2015)Runtime pointer disambiguationACM SIGPLAN Notices10.1145/2858965.281428550:10(589-606)Online publication date: 23-Oct-2015
    • (2015)Runtime pointer disambiguationProceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications10.1145/2814270.2814285(589-606)Online publication date: 23-Oct-2015
    • Show More Cited By

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media