Precise Exception Semantics in Dynamic Compilation

  • Authors:
  • Michael Gschwind;Erik R. Altman

  • Affiliations:
  • -;-

  • Venue:
  • CC '02 Proceedings of the 11th International Conference on Compiler Construction
  • Year:
  • 2002

Quantified Score

Hi-index 0.02

Visualization

Abstract

Maintaining precise exceptions is an important aspect of achieving full compatibility with a legacy architecture. While asynchronous exceptions can be deferred to an appropriate boundary in the code, synchronous exceptions must be taken when they occur. This introduces uncertainty into liveness analysis since processor state that is otherwise dead may be exposed when an exception handler is invoked. Previous systems either had to sacrifice full compatibility to achieve more freedom to perform optimization, use less aggressive optimization or rely on hardware support.In this work, we demonstrate how aggressive optimization can be used in conjunction with dynamic compilation without the need for specialized hardware. The approach is based on maintaining enough state to recompute the processor state when an unpredicted event such as a synchronous exception may make otherwise dead processor state visible. The transformations necessary to preserve precise exception capability can be performed in linear time.