Title
Fault-safe code motion for type-safe languages
Abstract
Compilers for Java and other type-safe languages have historically worked to overcome overheads and constraints imposed by runtime safety checks and precise exception semantics. We instead exploit these safety properties to perform code motion optimizations that are even more aggressive than those possible in unsafe languages such as C++. We present a novel framework for speculative motion of dangerous (potentially faulting) instructions in safe, object-oriented languages such as Java and C#. Unlike earlier work, our approach requires no hardware or operating system support. We leverage the properties already provided by a safe language to define fault safety, a more precise notion of safety that guarantees that a dangerous operation (e.g., a memory load) will not fault at a given program point. We illustrate how typical code motion optimizations are easily adapted to exploit our safety framework. First, we modify the standard SSAPRE partial redundancy elimination (PRE) algorithm to use fault safety, rather than the traditional down safety property. Our modified algorithm better exploits profile information by inserting of dangerous instructions on new paths when it is profitable and provably safe. Second, we extend an instruction trace scheduler to use fault safety to safely schedule load instructions across branches to better tolerate memory latency and to more compactly target instruction slots. We implemented these optimizations in StarJIT, a dynamic compiler, and show performance benefits of up to 10% on a set of standard Java benchmarks.
Year
DOI
Venue
2008
10.1145/1356058.1356078
CGO
Keywords
DocType
ISSN
fault-safe code motion,dangerous instruction,safe language,fault safety,code motion optimizations,runtime safety check,safety framework,standard java benchmarks,dangerous operation,safety property,type-safe language,speculative motion,intermediate representation,scheduling,profitability,memory latency,partial redundancy elimination,object oriented language
Conference
2164-2397
Citations 
PageRank 
References 
1
0.37
18
Authors
5
Name
Order
Citations
PageRank
Brian R. Murphy160884.68
Vijay Menon219113.11
Florian T. Schneider3291.88
Tatiana Shpeisman443632.69
Ali-Reza Adl-Tabatabai597162.68