Sciweavers

PLDI
2015
ACM

Provably correct peephole optimizations with alive

8 years 8 months ago
Provably correct peephole optimizations with alive
Compilers should not miscompile. Our work addresses problems in developing peephole optimizations that perform local rewriting to improve the efficiency of LLVM code. These optimizations are individually difficult to get right, particularly in the presence of undefined behavior; taken together they represent a persistent source of bugs. This paper presents Alive, a domain-specific language for writing optimizations and for automatically either proving them correct or else generating counterexamples. Furthermore, Alive can be automatically translated into C++ code that is suitable for inclusion in an LLVM optimization pass. Alive is based on an attempt to balance usability and formal methods; for example, it captures— but largely hides—the detailed semantics of three different kinds of undefined behavior in LLVM. We have translated more than 300 LLVM optimizations into Alive and, in the process, found that eight of them were wrong. Categories and Subject Descriptors D.2.4 [Pro...
Nuno P. Lopes, David Menendez, Santosh Nagarakatte
Added 16 Apr 2016
Updated 16 Apr 2016
Type Journal
Year 2015
Where PLDI
Authors Nuno P. Lopes, David Menendez, Santosh Nagarakatte, John Regehr
Comments (0)