2015 · 127 citations · 35 references
Large-scale Global OptimizationEngineeringCompiler TechnologySoftware EngineeringSoftware AnalysisUndefined BehaviorFormal VerificationCompilersApproximation TheoryCorrect Peephole OptimizationsDynamic CompilationContinuous OptimizationCompiler SupportComputer EngineeringComputer ScienceLocal RewritingOptimizing CompilerPeephole OptimizationsComputational ScienceAutomated ReasoningProgram AnalysisOptimization ProblemFormal Methods
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.
35
Formal verification of a realistic compiler
Xavier Leroy · Communications of the ACM · 2009 · 1.1K citations · Full text
Finding and understanding bugs in C compilers
Xuejun Yang, Yang Chen, Eric Eide et al. · 2011 · 714 citations
Finding and understanding bugs in C compilers
Xuejun Yang, Yang Chen, Eric Eide et al. · ACM SIGPLAN Notices · 2011 · 582 citations
Translation validation for an optimizing compiler
George C. Necula · 2000 · 482 citations