A framework for interprocedural optimization in the presence of dynamic class loading

  • Authors:
  • Vugranam C. Sreedhar;Michael Burke;Jong-Deok Choi

  • Affiliations:
  • IBM T.J. Watson Research Center, P.O. Box 704, Yorktown Heights, NY;IBM T.J. Watson Research Center, P.O. Box 704, Yorktown Heights, NY;IBM T.J. Watson Research Center, P.O. Box 704, Yorktown Heights, NY

  • Venue:
  • PLDI '00 Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

Dynamic class loading during program execution in the Java Programming Language is an impediment for generating code that is as efficient as code generated using static whole-program analysis and optimization. Whole-program analysis and optimization is possible for languages, such as C++, that do not allow new classes and/or methods to be loaded during program execution. One solution for performing whole-program analysis andavoiding incorrect execution after a new class is loaded is to invalidate and recompile affected methods. Runtime invalidation and recompilation mechanisms can be expensive in both space and time, and, therefore, generally restrict optimization.To address these drawbacks, we propose a new framework, called the extant analysis framework, for interprocedural optimization of programs that support dynamic class (or method)loading. Given a set of classes comprising the closed world, we perform an offline static analysis which partitions references into two categories:(1) unconditionally extant references which point only to objects whose runtime type is guaranteed to be in the closed world; and (2) conditionally extant references which point to objects whose runtime type is not guaranteed to be in the closed world. Optimizations solely dependent on the first categorycan be statically performed, and are guaranteed to be correct even with any future class/method loading. Optimizations dependent on the second category are guarded by dynamic tests, called extant safety tests, for correct execution behavior.We describe the properties for extant safety tests, and provide algorithms for their generation and placement.