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 条
  • [41] Differences in the Preferred Trustworthiness Between High-level and Low-Level Leaders
    Yan, Shimei
    Chen, Lizhe
    Zhang, Gang
    PSYCHOLOGICAL REPORTS, 2023,
  • [42] Security Policy Refinement: High-Level Specification to Low-Level Implementation
    Yang, Xia
    Alves-Foss, Jim
    2013 ASE/IEEE INTERNATIONAL CONFERENCE ON SOCIAL COMPUTING (SOCIALCOM), 2013, : 502 - 511
  • [43] Low-level Controllers Realizing High-level Decisions in an Autonomous Vehicle
    Werling, Moritz
    Groell, Lutz
    2008 IEEE INTELLIGENT VEHICLES SYMPOSIUM, VOLS 1-3, 2008, : 824 - +
  • [44] Low-level and high-level prior learning for visual saliency estimation
    Song, Mingli
    Chen, Chun
    Wang, Senlin
    Yang, Yezhou
    INFORMATION SCIENCES, 2014, 281 : 573 - 585
  • [45] Low-Level and High-Level Chlorine Kits for Plant and Field Use
    Fung, Leo C.
    Opflow, 1979, 5 (07) : 4 - 6
  • [46] Learning Low-Level Behaviors and High-Level Strategies in Humanoid Soccer
    Simoes, David
    Amaro, Pedro
    Silva, Tiago
    Lau, Nuno
    Reis, Luis Paulo
    FOURTH IBERIAN ROBOTICS CONFERENCE: ADVANCES IN ROBOTICS, ROBOT 2019, VOL 2, 2020, 1093 : 537 - 548
  • [47] DIFFERENTIAL-EFFECTS OF HIGH-LEVEL AND LOW-LEVEL POSTPASSAGE QUESTIONS
    WILHITE, SC
    AMERICAN JOURNAL OF PSYCHOLOGY, 1985, 98 (01): : 41 - 58
  • [48] Adaptation to invisible motion results in low-level but not high-level aftereffects
    Maruya, Kazushi
    Watanabe, Hiroki
    Watanabe, Masataka
    JOURNAL OF VISION, 2008, 8 (11):
  • [49] DEVICE FOR OFFSETTING HIGH-LEVEL ELECTRICAL INTERFERENCES IN LOW-LEVEL DETECTORS
    DOWD, G
    SPECTROSCOPY LETTERS, 1973, 6 (04) : 217 - 221
  • [50] Low-level versus high-level equilibrium in public utility services
    Strand, Jon
    JOURNAL OF PUBLIC ECONOMICS, 2012, 96 (1-2) : 163 - 172