Publications

Detailed Information

Reconciling high-level optimizations and low-level code in LLVM

Cited 9 time in Web of Science Cited 16 time in Scopus
Authors

Lee, Juneyoung; Hur, Chung-Kil; Jung, Ralf; Liu, Zhengyang; Regehr, John; Lopes, Nuno P.

Issue Date
2018-11
Publisher
Association for Computing Machinery (ACM)
Citation
Proceedings of the ACM on Programming Languages, Vol.2 No.OOPSLA
Abstract
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.
ISSN
2475-1421
URI
https://hdl.handle.net/10371/192880
DOI
https://doi.org/10.1145/3276495
Files in This Item:
There are no files associated with this item.
Appears in Collections:

Altmetrics

Item View & Download Count

  • mendeley

Items in S-Space are protected by copyright, with all rights reserved, unless otherwise indicated.

Share