Results 1 -
8 of
8
Single Intermediate Language That Supports Multiple Implementations of Exceptions
, 2000
"... We present mechanisms that enable our compiler-target language, C--, to express four of the best known techniques for implementing exceptions, all within a single, uniform framework. We define the mechanisms precisely, using a formal operational semantics. We also show that exceptions need not requi ..."
Abstract
-
Cited by 45 (18 self)
- Add to MetaCart
We present mechanisms that enable our compiler-target language, C--, to express four of the best known techniques for implementing exceptions, all within a single, uniform framework. We define the mechanisms precisely, using a formal operational semantics. We also show that exceptions need not require special treatment in the optimizer; by introducing extra dataflow edges, we make standard optimization techniques work even on programs that use exceptions. Our approach clarifies the design space of exceptionhandling techniques, and it allows a single optimizer to handle a variety of implementation techniques. Our ultimate goal is to allow a source-language compiler the freedom to choose its exception-handling policy, while encapsulating the architecture-dependent mechanisms and their optimization in an implementation of C-- that can be used by compilers for many source languages.
Optimizing Java Programs in the Presence of Exceptions
, 2000
"... The support for precise exceptions in Java, combined with frequent checks for runtime exceptions, leads to severe limitations on the compiler's ability to perform program optimizations that involve reordering of instructions. This paper presents a novel framework that allows a compiler to relax ..."
Abstract
-
Cited by 24 (2 self)
- Add to MetaCart
The support for precise exceptions in Java, combined with frequent checks for runtime exceptions, leads to severe limitations on the compiler's ability to perform program optimizations that involve reordering of instructions. This paper presents a novel framework that allows a compiler to relax these constraints. We first present an algorithm using dynamic analysis, and a variant using static analysis, to identify the subset of program state that need not be preserved if an exception is thrown. This allows many spurious dependence constraints between potentially excepting instructions (PEIs) and writes into variables to be eliminated. Our dynamic algorithm is particularly suitable for dynamically dispatched methods in object-oriented languages, where static analysis may be quite conservative. We then present the first software-only solution that allows dependence constraints among PEIs to be completely ignored while applying program optimizations, with no need to execute...
A Study of Exception Handling and Its Dynamic Optimization in Java
- In Proceedings of ACM SIGPLAN Conference on Object-oriented Programing Systems, Languages and Applications (OOPSLA’01
, 2001
"... Optimizing exception handling is critical for programs that frequently throw exceptions. We observed that there are many such exception-intensive programs in various categories of Java programs. There are two commonly used exception handling techniques, stack unwinding and stack cutting. Stack unwi ..."
Abstract
-
Cited by 13 (3 self)
- Add to MetaCart
Optimizing exception handling is critical for programs that frequently throw exceptions. We observed that there are many such exception-intensive programs in various categories of Java programs. There are two commonly used exception handling techniques, stack unwinding and stack cutting. Stack unwinding optimizes the normal path, while stack cutting optimizes the exception handling path. However, there has been no single exception handling technique to optimize both paths. We propose a new technique called Exception-Directed Optimization (Edo), which optimizes exception-intensive programs without slowing down exception-minimal programs. Edo, a feedbackdirected dynamic optimization, consists of three steps, exception path profiling, exception path inlining, and throw elimination. Exception path profiling attempts to detect hot exception paths. Exception path inlining compiles the catching method in a hot exception path, inlining the rest of methods in the path. Throw elimination replaces a throw with the explicit control flow to the corresponding catch. We implemented Edo in IBM's production Justin -Time compiler, and obtained the experimental results, which show that, in SPECjvm98, it improved performance of exceptionintensive programs by up to 18.3% without a#ecting performance of exception-minimal programs at all. Categories and Subject Descriptors D.3 [Software]: Programming Languages; D.3.4 [Programming Languages]: Processors---incremental compilers, optimization, runtime environment General Terms Performance, Experimentation, Languages Keywords Feedback-directed dynamic optimization, dynamic compilers, exception handling, inlining Copyright c # 2001 by the Association for Computing Machinery, Inc. Permission to make digital or hard copies of part or a...
Program Transformation in the Presence of Errors
- In Seventeenth Annual ACM Symposium on Principles of Programming Languages
, 1990
"... This paper presents a technique for preserving the power of general program transformations in the presence of a rich collection of distinguishable error values. This is accomplished by introducing an annotation, "Safe", to mark occurrences of functions that cannot produce errors. Succinct and gener ..."
Abstract
-
Cited by 8 (3 self)
- Add to MetaCart
This paper presents a technique for preserving the power of general program transformations in the presence of a rich collection of distinguishable error values. This is accomplished by introducing an annotation, "Safe", to mark occurrences of functions that cannot produce errors. Succinct and general algebraic laws can be expressed using Safe, thereby giving program transformations in a language with many error values the same power and generality as program transformations in a language with only a single error value (such as FP [Bac78]). In fact, the Safe mechanism accomplishes much more. It actually strengthens equational reasoning by providing a sufficient condition on a program context E(\Delta) and functions f and g; such that E(f) j E(g) even if f 6j g:
Bytecode-Level Analysis And Optimization Of Java Classes
, 1998
"... ....................................... x 1 INTRODUCTION . . . . . . ........................... 1 1.1 Optimization framework ........................... 1 1.2 Measurements................................. 2 1.3 Overview ................................... 2 2 BACKGROUND ....................... ..."
Abstract
-
Cited by 8 (0 self)
- Add to MetaCart
....................................... x 1 INTRODUCTION . . . . . . ........................... 1 1.1 Optimization framework ........................... 1 1.2 Measurements................................. 2 1.3 Overview ................................... 2 2 BACKGROUND .................................. 3 2.1 Controlflowgraphs.............................. 3 2.1.1 Dominators . . . ........................... 3 2.1.2 Loops . . . . . . ........................... 4 2.2 Staticsingleassignmentform......................... 6 2.2.1 Construction . . ........................... 7 2.2.2 Destruction . . . ........................... 11 2.3 Partial redundancy elimination . . . . .................... 12 2.3.1 SSAPRE . . . . ........................... 12 2.4 Other optimizations . . . ........................... 14 2.5 Typebasedaliasanalysis........................... 15 2.5.1 Terminology and notation . . .................... 16 v Page 2.5.2 TBAA . . . . . . ........................
Compiling Java for High Performance and the Internet
, 2001
"... Java is the first widely accepted language that addresses heterogeneous resources, security, and portability problems, making it attractive for scientific computation. It also encourages programmers to use object-oriented techniques in programming. Unfortunately, such object-oriented programs also i ..."
Abstract
-
Cited by 6 (4 self)
- Add to MetaCart
Java is the first widely accepted language that addresses heterogeneous resources, security, and portability problems, making it attractive for scientific computation. It also encourages programmers to use object-oriented techniques in programming. Unfortunately, such object-oriented programs also incur unacceptable performance penalties. For example, using a polymorphic number hierarchy in a linear algebra package resulted in a code that is four times shorter, more extensible and less bug-prone than the equivalent Fortran-style code, but also many times slower. To address the poor performance problem, this dissertation introduces several new compilation techniques that can improve the performance of scientific Java programs written in a polymorphic, object oriented style to within a factor of two of the equivalent hand-coded Fortran-style programs. These techniques also maintain an acceptable level of Java bytecode portability and flexibility, thus rewarding, rather than penalizing, good object-oriented programming practice. This dissertation first discards the typical one-class-at-a-time Java compilation model for a whole-program model. It then introduces two novel whole-program optimizations, class specialization and object inlining, which improve the performance of high-level, object-oriented, scientific Java programs by up to two orders of magnitude, effectively eliminating the penalty of object-oriented design. Next, this dissertation introduces a new Almost-whole-program compilation model. This model improves the flexibility of the generated code, while still permitting wholeprogram optimizations and incurring only modest performance penalties. It enables the programmer balance performance and flexibility of the program after the development phase, instead of ...
Annotating Java Class Files with Virtual
- Journal of Concurrency: Practice and Experience
, 1999
"... The Java .class file is a compact encoding of programs for a stack-based virtual machine. It is intended for use in a networked environment, which requires machine independence and minimized consumption of network bandwidth. ..."
Abstract
- Add to MetaCart
The Java .class file is a compact encoding of programs for a stack-based virtual machine. It is intended for use in a networked environment, which requires machine independence and minimized consumption of network bandwidth.
Exceptional Kernel -- Using C++ exceptions in the Linux kernel
"... Driven by the desire to facilitate more maintainable and robust systems, modern programming languages offer explicit constructs to facilitate the handling of exceptional events. The use of exceptions is common in user space programming, and is an integral part of common programming styles and best ..."
Abstract
- Add to MetaCart
Driven by the desire to facilitate more maintainable and robust systems, modern programming languages offer explicit constructs to facilitate the handling of exceptional events. The use of exceptions is common in user space programming, and is an integral part of common programming styles and best practices. In spite of this exceptions are rarely used in kernel-space. In fact, some operating systems, such as Linux, refrain altogether from using modern language constructs. We have implemented C++ kernel level run-time support for Linux, supporting the full range of C++ language abstractions, including run time type checking and exception handling. Through detailed instrumentation we show that introducing these mechanisms incurs negligible cost to normal program flow. Moreover, by enhancing the user level GNU g++ implementation we have reduced the cost of throwing and catching exceptions sufficiently, to make their use viable in a variety of in several important scenarios.

