Research

 

CSI ]   [ ETH ]


Lab Manager ]

LST Home ]     [ People ]     [ Research ]     [ Teaching ]
[ Publications ]     [ Research Opportunities ]     [ Partners & Supporters ]     [ Earlier Work ]

Fault-safe code motion for type-safe languages

Brian R. Murphy,  Vijay Menon,  Florian T. Schneider,  Tatiana Shpeisman,  Ali-Reza Adl-Tabatabai,  Fault-safe code motion for type-safe languages, Proceedings of the sixth annual IEEE/ACM international symposium on Code generation and optimization 2008. [CGO_2008.pdf]
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, objectoriented 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 [18, 20] 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 [1], a dynamic compiler, and show performance benefits of up to 10% on a set of standard Java benchmarks.
[ Publications ]     [ Research Opportunities ]     [ Partners & Supporters ]     [ Earlier Work ]