skip to main content
article
Open access

Combining analyses, combining optimizations

Published: 01 March 1995 Publication History

Abstract

Modern optimizing compilers use several passes over a program's intermediate representation to generate good code. Many of these optimizations exhibit a phase-ordering problem. Getting the best code may require iterating optimizations until a fixed point is reached. Combining these phases can lead to the discovery of more facts about the program, exposing more opportunities for optimization. This article presents a framework for describing optimizations. It shows how to combine two such frameworks and how to reason about the properties of the resulting framework. The structure of the frame work provides insight into when a combination yields better results. To make the ideas more concrete, this article presents a framework for combining constant propagation, value numbering, and unreachable-code elimination. It is an open question as to what other frameworks can be combined in this way.

References

[1]
ALPERN, B., WEGMAN, M. N., AND ZADECK, F. K. 1988. Detecting equality of variables in programs. In Conference Record of the 15th ACM Symposium on the Princzples of Programmtng Languages. ACM, New York, 1-11.
[2]
COUSOT, P AND COUSOT, R. 1979. Systematic demgn of program analysis frameworks. In Conference Record of the 6th ACM Sympostum on the Pmnctples of Programming Languages (San Antonio, Tex. Jan.). ACM, New York, 269-282.
[3]
CYTRON, R., FERRANTE, J., ROSEN, B. K., WEGMAN, M. N., AND ZADECK, F.K. 1989. An efficient method of computing static single assignment form. In Conference Record of the 16th ACM Symposium on the Principles of Programmzng Languages. ACM, New York, 25-35.
[4]
FERRANTE, J., OTTENSTEIN, K. J., AND WARREN, J.D. 1987. The program dependence graph and its use in optimization. ACM Trans. Program. Lang. Syst. 9, 3 (July), 319-349.
[5]
HECHT, M. 1977. Flow Analysis of Computer Programs. American Elsevier, North-Holland, Amsterdam.
[6]
KAM, J. AND ULLMAN, J. 1977. Monotone data flow analysis frameworks. Acta Informatzca 7, 305-317.
[7]
PINGALI, R. K., BECK, M. JOHNSON, R., MOUDGILL, M., AND STODGHILL, P. 1990. Dependence flow graph~: An algebraic approach to program dependencies. Tech. Rep. TR-90-1152, Cornell Univ., Ithaca, N. Y.
[8]
TARJAN, R.E. 1981. A unified approach to path problems J. ACM 28, 3 (July), 577-593.
[9]
TARSKI, A. 1955. A lattice-theoretical fixpoint theorem and its applicatmns. Pacific J. Math. 5, 285-309.
[10]
WEGMAN, M. N. AND ZADECK, F. K. 1991. Constant propagation with conditional branches ACM Trans. Program. Lang. Syst. 13, 2 (Apr.), 181-210

Cited By

View all
  • (2024)Compiling with Abstract InterpretationProceedings of the ACM on Programming Languages10.1145/36563928:PLDI(368-393)Online publication date: 20-Jun-2024
  • (2024)Translation Validation for JIT Compiler in the V8 JavaScript EngineProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639189(1-12)Online publication date: 20-May-2024
  • (2024)Fast and Precise Static Null Exception Analysis With Synergistic PreprocessingIEEE Transactions on Software Engineering10.1109/TSE.2024.346655150:11(3022-3036)Online publication date: Nov-2024
  • Show More Cited By

Index Terms

  1. Combining analyses, combining optimizations

    Recommendations

    Reviews

    Eddy Bevers

    Many compilers nowadays use static analyses to generate optimized code. A problem that often occurs is how to decide in what order these analyses should be performed: the results of one analysis can be of use to another. Sometimes combining two analyses leads to better results than running the two separately, in any order. In this paper, the authors start from analyses that are described in the monotone analysis framework [1]. They propose a model for combining such frameworks and for reasoning about the properties of the combination, such as its monotonicity and its run time complexity. In particular, the structure of the combination gives insight into whether the combination yields strictly better results than the separate analyses. The ideas in this paper are sound and well presented. They are illustrated with plenty of examples. In particular, the combined framework for constant propagation, value numbering, and unreachable-code elimination analyses gives a good insight into the problem and shows the practical use of the work. This research paper is primarily intended for researchers in compiler technology, but is also of use to compiler developers. Some mathematical background, especially in domain theory, is required.

    Access critical reviews of Computing literature here

    Become a reviewer for Computing Reviews.

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Transactions on Programming Languages and Systems
    ACM Transactions on Programming Languages and Systems  Volume 17, Issue 2
    March 1995
    249 pages
    ISSN:0164-0925
    EISSN:1558-4593
    DOI:10.1145/201059
    Issue’s Table of Contents

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 01 March 1995
    Published in TOPLAS Volume 17, Issue 2

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. constant propagation
    2. data-flow analysis
    3. optimizing compilers
    4. value numbering

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)498
    • Downloads (Last 6 weeks)52
    Reflects downloads up to 21 Dec 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Compiling with Abstract InterpretationProceedings of the ACM on Programming Languages10.1145/36563928:PLDI(368-393)Online publication date: 20-Jun-2024
    • (2024)Translation Validation for JIT Compiler in the V8 JavaScript EngineProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639189(1-12)Online publication date: 20-May-2024
    • (2024)Fast and Precise Static Null Exception Analysis With Synergistic PreprocessingIEEE Transactions on Software Engineering10.1109/TSE.2024.346655150:11(3022-3036)Online publication date: Nov-2024
    • (2024)Software Architecture Reconstruction for Microservice Systems Using Static Analysis via GraalVM Native Image2024 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER60148.2024.00008(12-22)Online publication date: 12-Mar-2024
    • (2023)SSA Translation Is an Abstract InterpretationProceedings of the ACM on Programming Languages10.1145/35712587:POPL(1895-1924)Online publication date: 11-Jan-2023
    • (2023)Differential Testing of a Verification Framework for Compiler Optimizations (Case Study)2023 IEEE/ACM 11th International Conference on Formal Methods in Software Engineering (FormaliSE)10.1109/FormaliSE58978.2023.00015(66-75)Online publication date: May-2023
    • (2023)BibliographyEngineering a Compiler10.1016/B978-0-12-815412-0.00023-1(793-813)Online publication date: 2023
    • (2023)Scalar OptimizationEngineering a Compiler10.1016/B978-0-12-815412-0.00016-4(517-573)Online publication date: 2023
    • (2022)Guard the Cache: Dispatch Optimization in a Contextual Role-oriented LanguageProceedings of the 14th ACM International Workshop on Context-Oriented Programming and Advanced Modularity10.1145/3570353.3570357(27-34)Online publication date: 7-Jun-2022
    • (2021)MLIRProceedings of the 2021 IEEE/ACM International Symposium on Code Generation and Optimization10.1109/CGO51591.2021.9370308(2-14)Online publication date: 27-Feb-2021
    • Show More Cited By

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Login options

    Full Access

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media