Practical Verification of Peephole Optimizations with Alive.

Compilers should not miscompile. Peephole optimizations, which perform local rewriting of the input program to improve the efficiency of generated code, are a persistent source of compiler bugs. We created Alive, a domain-specific language for writing optimizations and for automatically either provi...

Descripción completa

Detalles Bibliográficos
Publicado en:Communications of the ACM Vol. 61; no. 2; pp. 84 - 92
Autores principales: Lopes, Nuno P., Menendez, David, Nagarakatte, Santosh, Regehr, John
Formato: Artículo
Publicado: Association for Computing Machinery Feb2018
Materias:
Acceso en línea:Ver este registro en EBSCOhost
Descripción
Sumario:Compilers should not miscompile. Peephole optimizations, which perform local rewriting of the input program to improve the efficiency of generated code, are a persistent source of compiler bugs. We created 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 the various kinds of undefined behavior. Alive has found numerous bugs in the LLVM compiler and is being used by LLVM developers.