Affiliation:
1. Microsoft Research, UK
2. Rutgers University, USA
3. University of Utah, USA
Abstract
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.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
16 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Automatic Generation of Vectorizing Compilers for Customizable Digital Signal Processors;Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 1;2024-04-17
2. Synthesizing Quantum-Circuit Optimizers;Proceedings of the ACM on Programming Languages;2023-06-06
3. Finding and Understanding Incompleteness Bugs in SMT Solvers;Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering;2022-10-10
4. Modular, compositional, and executable formal semantics for LLVM IR;Proceedings of the ACM on Programming Languages;2021-08-22
5. Detecting critical bugs in SMT solvers using blackbox mutational fuzzing;Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering;2020-11-07