Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1064979.1064998acmconferencesArticle/Chapter ViewAbstractPublication PagesveeConference Proceedingsconference-collections
Article

Optimized interval splitting in a linear scan register allocator

Published: 11 June 2005 Publication History

Abstract

We present an optimized implementation of the linear scan register allocation algorithm for Sun Microsystems' Java HotSpot™ client compiler. Linear scan register allocation is especially suitable for just-in-time compilers because it is faster than the common graph-coloring approach and yields results of nearly the same quality.Our allocator improves the basic linear scan algorithm by adding more advanced optimizations: It makes use of lifetime holes, splits intervals if the register pressure is too high, and models register constraints of the target architecture with fixed intervals. Three additional optimizations move split positions out of loops, remove register-to-register moves and eliminate unnecessary spill stores. Interval splitting is based on use positions, which also capture the kind of use and whether an operand is needed in a register or not. This avoids the reservation of a scratch register.Benchmark results prove the efficiency of the linear scan algorithm: While the compilation speed is equal to the old local register allocator that is part of the Sun JDK 5.0, integer benchmarks execute about 15% faster. Floating-point benchmarks show the high impact of the Intel SSE2 extensions on the speed of numeric Java applications: With the new SSE2 support enabled, SPECjvm98 executes 25% faster compared with the current Sun JDK 5.0.

References

[1]
P. Briggs, K. D. Cooper, and L. Torczon. Improvements to graph coloring register allocation. ACM Transactions on Programming Languages and Systems, 16(3):428--455, 1994.
[2]
G. J. Chaitin, M. A. Auslander, A. K. Chandra, J. Cocke, M. E. Hopkins, and P. W. Markstein. Register allocation via coloring. Computer Languages, 6:47--57, 1981.
[3]
R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. 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.
[4]
R. Griesemer and S. Mitrovic. A compiler for the Java HotSpot™ virtual machine. In L. Böszörményi, J. Gutknecht, and G. Pomberger, editors, The School of Niklaus Wirth: The Art of Simplicity, pages 133--152. dpunkt.verlag, 2000.
[5]
Institute of Electrical and Electronics Engineers. IEEE Standard for Binary Floating-Point Arithmetic. ANSI/IEEE Standard 754-1985.
[6]
Intel Corporation. IA-32 Intel Architecture Software Developer's Manual, Volume 1: Basic Architecture, 2004. Order Number 253665.
[7]
T. Kotzmann and H. Mössenböck. Escape analysis in the context of dynamic compilation and deoptimization. In Proceedings of the First Conference on Virtual Execution Environments, 2005.
[8]
H. Mössenböck. Adding static single assignment form and a graph coloring register allocator to the Java HotSpot™ client compiler. Technical Report 15, Institute for Practical Computer Science, Johannes Kepler University Linz, 2000.
[9]
H. Mössenböck and M. Pfeiffer. Linear scan register allocation in the context of SSA form and register constraints. In Proceedings of the 11th International Conference on Compiler Construction, pages 229--246, 2002.
[10]
M. Paleczny, C. Vick, and C. Click. The Java HotSpot™ server compiler. In Proceedings of the Java Virtual Machine Research and Technology Symposium, 2001.
[11]
J. Park and S.-M. Moon. Optimistic register coalescing. ACM Transactions on Programming Languages and Systems, 26(4):735--765, 2004.
[12]
M. Poletto, D. R. Engler, and M. F. Kaashoek. tcc: A system for fast, flexible, and high-level dynamic code generation. In Proceedings of the ACM SIGPLAN 1997 conference on Programming language design and implementation, pages 109--121. ACM Press, 1997.
[13]
M. Poletto and V. Sarkar. Linear scan register allocation. ACM Transactions on Programming Languages and Systems, 21(5):895--913, 1999.
[14]
R. Pozo and B. Miller. SciMark 2.0. http://math.nist.gov/scimark2/.
[15]
Standard Performance Evaluation Corporation. SPECjvm98. http://www.spec.org/jvm98/.
[16]
Sun Microsystems, Inc. The Java HotSpot™ Virtual Machine, v1.4.1, 2002. http://java.sun.com/products/hotspot.
[17]
O. Traub, G. Holloway, and M. D. Smith. Quality and speed in linear-scan register allocation. In Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation, pages 142--151. ACM Press, 1998.
[18]
C. Wimmer. Linear scan register allocation for the Java HotSpot™ client compiler. Master's thesis, Johannes Kepler University Linz, 2004.

Cited By

View all
  • (2024)Compile-Time Analysis of Compiler Frameworks for Query Compilation2024 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO57630.2024.10444856(233-244)Online publication date: 2-Mar-2024
  • (2023)Experimental design and analysis of polyhedral optimization algorithm based on LoongArch64 architectureProceedings of the 2023 2nd International Conference on Algorithms, Data Mining, and Information Technology10.1145/3625403.3626204(212-217)Online publication date: 15-Sep-2023
  • (2023)RegGuardComputers and Security10.1016/j.cose.2023.103213129:COnline publication date: 1-Jun-2023
  • Show More Cited By

Index Terms

  1. Optimized interval splitting in a linear scan register allocator

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    VEE '05: Proceedings of the 1st ACM/USENIX international conference on Virtual execution environments
    June 2005
    216 pages
    ISBN:1595930477
    DOI:10.1145/1064979
    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: 11 June 2005

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. compilers
    2. graph-coloring
    3. java
    4. just-in-time compilation
    5. linear scan
    6. optimization
    7. register allocation

    Qualifiers

    • Article

    Conference

    VEE05

    Acceptance Rates

    Overall Acceptance Rate 80 of 235 submissions, 34%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)27
    • Downloads (Last 6 weeks)1
    Reflects downloads up to 03 Sep 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Compile-Time Analysis of Compiler Frameworks for Query Compilation2024 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO57630.2024.10444856(233-244)Online publication date: 2-Mar-2024
    • (2023)Experimental design and analysis of polyhedral optimization algorithm based on LoongArch64 architectureProceedings of the 2023 2nd International Conference on Algorithms, Data Mining, and Information Technology10.1145/3625403.3626204(212-217)Online publication date: 15-Sep-2023
    • (2023)RegGuardComputers and Security10.1016/j.cose.2023.103213129:COnline publication date: 1-Jun-2023
    • (2022)Hybrid Register Allocation with Spill Cost and Pattern Guided OptimizationLanguages and Compilers for Parallel Computing10.1007/978-3-030-99372-6_3(33-49)Online publication date: 24-Mar-2022
    • (2021)Register AllocationSSA-based Compiler Design10.1007/978-3-030-80515-9_22(303-328)Online publication date: 12-Jun-2021
    • (2019)An optimization-driven incremental inline substitution algorithm for just-in-time compilersProceedings of the 2019 IEEE/ACM International Symposium on Code Generation and Optimization10.5555/3314872.3314893(164-179)Online publication date: 16-Feb-2019
    • (2019)Fast, frequency-based, integrated register allocation and instruction schedulingSoftware—Practice & Experience10.5555/1403740.140374138:11(1105-1126)Online publication date: 4-Jan-2019
    • (2019)A global progressive register allocatorACM SIGPLAN Notices10.1145/1133255.113400641:6(204-215)Online publication date: 27-Feb-2019
    • (2019)An Optimization-Driven Incremental Inline Substitution Algorithm for Just-in-Time Compilers2019 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO.2019.8661171(164-179)Online publication date: Feb-2019
    • (2018)Partial control-flow linearizationACM SIGPLAN Notices10.1145/3296979.319241353:4(543-556)Online publication date: 11-Jun-2018
    • 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