2017
DOI: 10.1145/3140587.3062343
|View full text |Cite
|
Sign up to set email alerts
|

Taming undefined behavior in LLVM

Abstract: A central concern for an optimizing compiler is the design of its intermediate representation (IR) for code. The IR should make it easy to perform transformations, and should also afford efficient and precise static analysis. In this paper we study an aspect of IR design that has received little attention: the role of undefined behavior. The IR for every optimizing compiler we have looked at, including GCC, LLVM, Intel's, and Microsoft's, supports one or more forms of undefined behavior (UB), not only to refle… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
2
1
1
1

Citation Types

0
9
0

Year Published

2019
2019
2024
2024

Publication Types

Select...
4
3

Relationship

0
7

Authors

Journals

citations
Cited by 12 publications
(9 citation statements)
references
References 20 publications
0
9
0
Order By: Relevance
“…If a program contains undened behaviors, compilers may produce varied results. Identifying undened behaviors is a dicult challenge in compiler research [49,78]. It is also a threat in our work, since our mutation may introduce undened behaviors.…”
Section: Discussionmentioning
confidence: 99%
See 1 more Smart Citation
“…If a program contains undened behaviors, compilers may produce varied results. Identifying undened behaviors is a dicult challenge in compiler research [49,78]. It is also a threat in our work, since our mutation may introduce undened behaviors.…”
Section: Discussionmentioning
confidence: 99%
“…In DiWi, we only kept the passing programs with the same results to isolate bugs, and thus the threat may be not serious. We will relieve this problem by adopting existing light-weight methods [49] for identifying undened behaviors.…”
Section: Discussionmentioning
confidence: 99%
“…Infamously, LLVM IR supports poisoned values (poison) representing a deferred undefined behavior [Lee et al 2017]. Deferred UB is instrumental for aggressive optimizations, but a semantic subtlety.…”
Section: Dynamic Valuesmentioning
confidence: 99%
“…Moreover, there is ample existing work that aims to build formal semantics for (oftentimes just parts of) the LLVM IR. Notable examples include the Vellvm [Zhao et al 2012[Zhao et al , 2013, Alive [Lopes et al 2015;Menendez and Nagarakatte 2017], Crellvm [Kang et al 2018], and K-LLVM [Li and Gunter 2020] projects, as well as attempts to characterize LLVM's undefined behaviors [Lee et al 2017], its concurrency semantics [Chakraborty and Vafeiadis 2017], and memory models [Kang et al 2015;.…”
Section: Introductionmentioning
confidence: 99%
“…Julia is a high level programming language primarily intended for intense data management and scientific computing applications [52]. Although interpreted, it offers high performance [53] as it is based on the low level virtual machine (LLVM) infrastructure engine [54]. The capabilities and the respective performance of the various ML models of Julia are described in Reference [55] especially over massive graphics processing unit (GPU) arrays [56].…”
Section: Previous Workmentioning
confidence: 99%