Fault-Safe Code Motion for Type-Safe Languages

被引:0
|
作者
Murphy, Brian R. [1 ]
Menon, Vijay [1 ]
Schneider, Florian T. [1 ]
Shpeisman, Tatiana [1 ]
Adl-Tabatabai, Ali-Reza [1 ]
机构
[1] Google, Beijing, Peoples R China
关键词
code motion; speculative code motion; safety dependences; intermediate representations;
D O I
暂无
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
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 pet-form 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 [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 Lip to 10% on a set of standard Java benchmarks.
引用
收藏
页码:144 / 154
页数:11
相关论文
共 50 条
  • [41] Safe to the Last Instruction: Automated Verification of a Type-Safe Operating System
    Yang, Jean
    Hawblitzel, Chris
    [J]. ACM SIGPLAN NOTICES, 2010, 45 (06) : 99 - 110
  • [42] Safe to the Last Instruction: Automated Verification of a Type-Safe Operating System
    Yang, Jean
    Hawblitzel, Chris
    [J]. COMMUNICATIONS OF THE ACM, 2011, 54 (12) : 123 - 131
  • [43] Type-safe runtime class upgrades in Creol
    Yu, Ingrid Chieh
    Johnsen, Einar Broch
    Owe, Olaf
    [J]. FORMAL METHODS FOR OPEN OBJECT-BASED DISTRIBUTED SYSTEMS, 2006, 4037 : 202 - 217
  • [44] Type-safe trading proxies using TORBA
    Marvie, R
    Merle, P
    Geib, JM
    Leblane, S
    [J]. 5TH INTERNATIONAL SYMPOSIUM ON AUTONOMOUS DECENTRALIZED SYSTEMS, PROCEEDINGS, 2001, : 303 - 310
  • [45] Squid: Type-Safe, Hygienic, and Reusable Quasiquotes
    Parreaux, Lionel
    Shaikhha, Amir
    Koch, Christoph E.
    [J]. SCALA'17: PROCEEDINGS OF THE 8TH ACM SIGPLAN INTERNATIONAL SYMPOSIUM ON SCALA, 2017, : 56 - 66
  • [46] Automatically Proving Equivalence by Type-Safe Reflection
    Slama, Franck
    Brady, Edwin
    [J]. INTELLIGENT COMPUTER MATHEMATICS, 2017, 10383 : 40 - 55
  • [47] Concise, Type-Safe, and Efficient Structural Diffing
    Erdweg, Sebastian
    Szabo, Tamas
    Pacak, Andre
    [J]. PROCEEDINGS OF THE 42ND ACM SIGPLAN INTERNATIONAL CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '21), 2021, : 406 - 419
  • [48] Type-Safe Updating for Modular WSN Software
    Porter, Barry
    Roedig, Utz
    Coulson, Geoff
    [J]. 2011 INTERNATIONAL CONFERENCE ON DISTRIBUTED COMPUTING IN SENSOR SYSTEMS AND WORKSHOPS (DCOSS), 2011,
  • [49] Type-safe delegation for dynamic component adaptation
    Kniesel, G
    [J]. OBJECT-ORIENTED TECHNOLOGY: ECOOP'98 WORKSHOP READER, 1998, 1543 : 136 - 137
  • [50] CCured: Type-safe retrofitting of legacy software
    Necula, GC
    Condit, J
    Harren, M
    McPeak, S
    Weimer, W
    [J]. ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2005, 27 (03): : 477 - 526