Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/1356058.1356077acmconferencesArticle/Chapter ViewAbstractPublication PagescgoConference Proceedingsconference-collections
research-article

Removing redundancy via exception check motion

Published: 06 April 2008 Publication History

Abstract

Partial redundancy elimination aims to reduce the number of times an expression is computed more than once. The traditional Lazy Code Motion (LCM) algorithm formulated by Knoop, Ruthing and Steffen, through its reliance on unordered bit vectors, is severely limited in its ability to remove redundancy when precise exception semantics are required because bit vectors cannot express the order of exception checks. This paper describes our new PRE algorithm Exception Check Motion that uses the LCM algorithm to treat and optimize exception checks in a similar way to any other expression. Unlike earlier techniques that can remove only the compare instruction of a partially redundant exception check, our solution can eliminate both the compare and trap instructions without any run time code patching or expensive recovery operations. Since it is the trap instructions that restrict subsequent code motions, our technique gives downstream optimizations more flexibility to improve the performance of the resulting code once the partially redundant checks are eliminated. Our analysis has been implemented in the IBM® Testarossa (TR) just-in-time (JIT) compiler in the IBM Developer Kit for Java Release 5.0 as part of the J9 Virtual Machine. We measure performance improvements up to 7.6% and averaging 2.5% across 22 SPEC and DaCapo benchmarks on 4-way IBM pSeries (PowerPC) hardware.

References

[1]
S. M. Blackburn et al. The DaCapo Benchmarks: Java Benchmarking Development and Analysis, OOPSLA '06: Proceedings of the 21st annual ACM SIGPLAN conference on Object-Oriented Programming, Systems, Languages, and Applications. Oct 2006.
[2]
R. Bodik, R. Gupta, and V. Sarkar. ABCD: Eliminating Array Bounds Checks on Demand. In Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation, pages 321--333. ACM Press, 2000.
[3]
R. Bodik, R. Gupta, and M. L. Soffa. Complete Removal of Redundant Expressions. In SIGPLAN Conference on Programming Language Design and Implementation, pages 1--14, 1998.
[4]
Q. Cai and J. Xue. Optimal and Efficient Speculation-based Partial Redundancy Elimination. In Proceedings of the International Symposium on Code Generation and Optimization, pages 91--102. IEEE Computer Society 2003.
[5]
J. Gosling, B. Joy, G. Steele and G. Bracha. The Java Language Specification, Third Edition. Addison--Wesley, 2005.
[6]
M. Gupta, J.-D. Choi, and M. Hind. Optimizing Java Programs in the Presence of Exceptions. In Proceedings of the 14th European Conference on Object-Oriented Programming, pages 422--446. Springer--Verlag, 2000.
[7]
R. N. Horspool and H. C. Ho. Partial Redundancy Elimination Driven by a Cost--benefit Analysis. In Proceedings of the 8th Israeli Conference on Computer-Based Systems and Software Engineering. IEEE Computer Society, 1997.
[8]
IBM developer kits. http://www-128.ibm.com/developerworks/java/jdk/index.html
[9]
M. Kawahito, H. Komatsu, and T. Nakatani. Effective Null pointer Check Elimination Utilizing Hardware Trap. In Proceedings of the Ninth International conference on Architectural Support for Programming Languages and Operating Systems, pages 139--149, 2000.
[10]
J. Knoop, O. Ruthing, and B. Steffen. Lazy Code Motion. In Proceedings of the ACM SIGPLAN'92 Conference on Programming Language Design and Implementation, pages 224--23. 1992.
[11]
J. Knoop, O. Ruthing, and B. Steffen. The Power of Assignment Motion. In Proceedings of the ACM SIGPLAN'95 Conference on Programming Language Design and Implementation, pages 233--245. 1995.
[12]
T. Lindholm and F. Yellin. The Java" Virtual Machine Specification, Second Edition. Addison--Wesley, 1999.
[13]
E. Morel and C. Renvoise. Global Optimization by Suppression of Partial Redundancies. Communications of the ACM, 22(2):96--103, 1979.
[14]
National Institute of Standards and Technology. SciMark 2.0 http://math.nist.gov/scimark2/
[15]
R. Odaira and K. Hiraki. Sentinel PRE: Hoisting beyond Exception Dependency with Dynamic Deoptimization. In Proceedings of the 2005 International Symposium on Code Generation and Optimization, pages 328--338, 2005.
[16]
Standard Performance Evaluation Corporation SPECjbb2005 (Java Server Benchmark) http://www.spec.org/jbb2005/
[17]
Standard Performance Evaluation Corporation SPECjbb2000 (Java Business Benchmark) http://www.spec.org/jbb2000/
[18]
Standard Performance Evaluation Corporation SPECjvm98 Benchmarks. http://www.spec.org/jvm98/
[19]
M. Stoodley and V. Sundaresan. Automatically Reducing Repetitive Synchronization with a Just-In-Time Compiler for Java. In Proceedings of the Third International Symposium on Code Generation and Optimization. March 2004.
[20]
V. Sundaresan, D. Maier, P. Ramarao and M. Stoodley. Experiences with Multi--threading and Dynamic Class Loading in a Java Just--In--Time Compiler. In Proceedings of the Third International Symposium on Code Generation and Optimization. March 2006.

Cited By

View all
  • (2013)An intermediate representation for speculative optimizations in a dynamic compilerProceedings of the 7th ACM workshop on Virtual machines and intermediate languages10.1145/2542142.2542143(1-10)Online publication date: 28-Oct-2013
  • (2010)Local redundant polymorphism query eliminationProceedings of the 8th International Conference on the Principles and Practice of Programming in Java10.1145/1852761.1852773(78-88)Online publication date: 15-Sep-2010

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
CGO '08: Proceedings of the 6th annual IEEE/ACM international symposium on Code generation and optimization
April 2008
235 pages
ISBN:9781595939784
DOI:10.1145/1356058
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: 06 April 2008

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. java
  2. just-in-time compilation
  3. partial redundancy elimination.

Qualifiers

  • Research-article

Conference

CGO '08

Acceptance Rates

CGO '08 Paper Acceptance Rate 21 of 66 submissions, 32%;
Overall Acceptance Rate 312 of 1,061 submissions, 29%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 13 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2013)An intermediate representation for speculative optimizations in a dynamic compilerProceedings of the 7th ACM workshop on Virtual machines and intermediate languages10.1145/2542142.2542143(1-10)Online publication date: 28-Oct-2013
  • (2010)Local redundant polymorphism query eliminationProceedings of the 8th International Conference on the Principles and Practice of Programming in Java10.1145/1852761.1852773(78-88)Online publication date: 15-Sep-2010

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