Reconciling High-Level Optimizations and Low-Level Code in LLVM

被引:0
|
作者
Lee, Juneyoung [1 ]
Hur, Chung-Kil [1 ]
Jung, Ralf [2 ]
Liu, Zhengyang [3 ]
Regehr, John [3 ]
Lopes, Nuno P. [4 ]
机构
[1] Seoul Natl Univ, Seoul, South Korea
[2] MPI SWS, Saarbrucken, Germany
[3] Univ Utah, Salt Lake City, UT 84112 USA
[4] Microsoft Res, Cambridge, England
基金
美国国家科学基金会; 新加坡国家研究基金会;
关键词
IR Memory Model; LLVM;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
LLVM miscompiles certain programs in C, C++, and Rust that use low-level language features such as raw pointers in Rust or conversion between integers and pointers in C or C++. The problem is that it is difficult for the compiler to implement aggressive, high-level memory optimizations while also respecting the guarantees made by the programming languages to low-level programs. A deeper problem is that the memory model for LLVM's intermediate representation (IR) is informal and the semantics of corner cases are not always clear to all compiler developers. We developed a novel memory model for LLVM IR and formalized it. The new model requires a handful of problematic IR-level optimizations to be removed, but it also supports the addition of new optimizations that were not previously legal. We have implemented the new model and shown that it fixes known memory-model-related miscompilations without impacting the quality of generated code.
引用
收藏
页数:28
相关论文
共 50 条
  • [21] LOW-LEVEL RADIOACTIVE-WASTES, HIGH-LEVEL RISK
    NEWMAN, A
    ENVIRONMENTAL SCIENCE & TECHNOLOGY, 1994, 28 (11) : A488 - A491
  • [22] Drawing the boundary between low-level and high-level mindreading
    de Vignemont, Frederique
    PHILOSOPHICAL STUDIES, 2009, 144 (03) : 457 - 466
  • [23] Music Genre Prediction by Low-Level and High-Level Characteristics
    Vatolkin, Igor
    Roetter, Guenther
    Weihs, Claus
    DATA ANALYSIS, MACHINE LEARNING AND KNOWLEDGE DISCOVERY, 2014, : 427 - 434
  • [24] High-level soccer indexing on low-level feature space
    Sugano, M
    Uemura, K
    Nakajima, Y
    Yanagihara, H
    ICIP: 2004 INTERNATIONAL CONFERENCE ON IMAGE PROCESSING, VOLS 1- 5, 2004, : 1625 - 1628
  • [25] Drawing the boundary between low-level and high-level mindreading
    Frédérique de Vignemont
    Philosophical Studies, 2009, 144 : 457 - 466
  • [26] CBIR: From low-level features to high-level semantics
    Zhou, XS
    Huang, TS
    IMAGE AND VIDEO COMMUNICATIONS AND PROCESSING 2000, 2000, 3974 : 426 - 431
  • [27] High-level to Low-level in Unity with GPU Shader Programming
    Hmeljak, Dimitrij
    PROCEEDINGS OF THE 53RD ACM TECHNICAL SYMPOSIUM ON COMPUTER SCIENCE EDUCATION (SIGCSE 2022), VOL 2, 2022, : 1140 - 1140
  • [28] Psilocybin impairs high-level but not low-level motion perception
    Carter, OL
    Pettigrew, JD
    Burr, DC
    Alais, D
    Hasler, F
    Vollenweider, FX
    NEUROREPORT, 2004, 15 (12) : 1947 - 1951
  • [29] Unifying Low-Level and High-Level Music Similarity Measures
    Bogdanov, Dmitry
    Serra, Joan
    Wack, Nicolas
    Herrera, Perfecto
    Serra, Xavier
    IEEE TRANSACTIONS ON MULTIMEDIA, 2011, 13 (04) : 687 - 701
  • [30] LPMs: high-level design uses low-level techniques
    Maxfield, Intergraph Computer Systems
    EDN, 10 (7pp):