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 条
  • [31] Visual high-level regions respond to high-level stimulus content in the absence of low-level confounds
    Schindler, Andreas
    Bartels, Andreas
    NEUROIMAGE, 2016, 132 : 520 - 525
  • [32] Evaluating Optimizations for a High-Level Language
    Kaplan, Leonardo
    Ierusalimschy, Roberto
    25TH BRAZILIAN SYMPOSIUM ON PROGRAMMING LANGUAGES, SBLP 2021, 2021, : 25 - 32
  • [33] Incorporating high-level and low-level cues for pain intensity estimation
    Yang, Ruijing
    Hong, Xiaopeng
    Peng, Jinye
    Feng, Xiaoyi
    Zhao, Guoying
    2018 24TH INTERNATIONAL CONFERENCE ON PATTERN RECOGNITION (ICPR), 2018, : 3495 - 3500
  • [34] HIGH-LEVEL AND LOW-LEVEL COMPUTER VISION - TOWARDS AN INTEGRATED APPROACH
    ADORNI, G
    BROGGI, A
    CONTE, G
    DANDREA, V
    SANSOE, C
    LECTURE NOTES IN ARTIFICIAL INTELLIGENCE, 1991, 549 : 322 - 331
  • [35] Evolution of high-level resistance during low-level antibiotic exposure
    Wistrand-Yuen, Erik
    Knopp, Michael
    Hjort, Karin
    Koskiniemi, Sanna
    Berg, Otto G.
    Andersson, Dan I.
    NATURE COMMUNICATIONS, 2018, 9
  • [36] High-Level, but Not Low-Level, Motion Perception Is Impaired in Patients With Schizophrenia
    Kandil, Farid I.
    Pedersen, Anya
    Wehnes, Jana
    Ohrmann, Patricia
    NEUROPSYCHOLOGY, 2013, 27 (01) : 60 - 68
  • [37] Methodology of liking high-level synthesis and low-level physical design
    Ma, Cong
    Yan, Zongfu
    Ma, Weiguo
    Liu, Mingye
    Tien Tzu Hsueh Pao/Acta Electronica Sinica, 1998, 26 (02): : 71 - 73
  • [38] HIGH-LEVEL AND LOW-LEVEL RESISTANCE TO TRICHODERMIN IN SACCHAROMYCES-CEREVISIAE
    CANNON, M
    JIMENEZ, A
    LOBATO, MF
    MOUNT, R
    MITLIN, J
    GUERRERO, MC
    BIOCHEMICAL SOCIETY TRANSACTIONS, 1987, 15 (06) : 1041 - 1042
  • [39] Toward Achieving Robust Low-Level and High-Level Scene Parsing
    Shuai, Bing
    Ding, Henghui
    Liu, Ting
    Wang, Gang
    Jiang, Xudong
    IEEE TRANSACTIONS ON IMAGE PROCESSING, 2019, 28 (03) : 1378 - 1390
  • [40] Comparing high-level and low-level implementations of a molecular dynamics algorithm
    Travieso, G
    SECOND INTERNATIONAL WORKSHOP ON HIGH-LEVEL PARALLEL PROGRAMMING MODELS AND SUPPORTIVE ENVIRONMENTS, PROCEEDINGS, 1997, : 130 - 134