Write a Blog >>
Tue 20 Jun 2017 16:35 - 17:00 at Actes, Civil Engineering - Correctness Chair(s): Joseph Devietti

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 reflect the semantics of UB-heavy programming languages such as C and C++, but also to model inherently unsafe low-level operations such as memory stores and to avoid over-constraining IR semantics to the point that desirable transformations become illegal. The current semantics of LLVM’s IR fails to justify some cases of loop unswitching, global value numbering, and other important ``textbook'' optimizations, causing long-standing bugs.

We present solutions to the problems we have identified in LLVM’s IR and show that most optimizations currently in LLVM remain sound, and that some desirable new transformations become permissible. Our solutions do not degrade compile time or performance of generated code.

Conference Day
Tue 20 Jun

Displayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change

16:10 - 17:00
CorrectnessPLDI Research Papers at Actes, Civil Engineering
Chair(s): Joseph DeviettiUniversity of Pennsylvania
Repairing Sequential Consistency in C/C++11
PLDI Research Papers
Ori LahavMPI-SWS, Viktor VafeiadisMPI-SWS, Germany, Jeehoon KangSeoul National University, Chung-Kil HurSeoul National University, Derek DreyerMPI-SWS
Media Attached
Taming Undefined Behavior in LLVM
PLDI Research Papers
Juneyoung LeeSeoul National University, Yoonseung KimSeoul National University (South Korea), Youngju SongSeoul National University, Chung-Kil HurSeoul National University, Sanjoy DasAzul Systems, David MajnemerGoogle, John RegehrUniversity of Utah, Nuno P. LopesMicrosoft Research
Pre-print Media Attached