Termination-Checking for LLVM Peephole Optimizations
@article{Menendez2016TerminationCheckingFL, title={Termination-Checking for LLVM Peephole Optimizations}, author={David Menendez and Santosh Nagarakatte}, journal={2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE)}, year={2016}, pages={191-202} }
Mainstream compilers contain a large number of peephole optimizations, which perform algebraic simplification of the input program with local rewriting of the code. These optimizations are a persistent source of bugs. Our recent research on Alive, a domain-specific language for expressing peephole optimizations in LLVM, addresses a part of the problem by automatically verifying the correctness of these optimizations and generating C++ code for use with LLVM. This paper identifies a class of non…
Figures and Tables from this paper
7 Citations
Practical formal techniques and tools for developing LLVM’s peephole optimizations
- Computer Science
- 2018
This dissertation presents Alive, a domain-specific language for specifying peephole optimizations in LLVM, and the Alive-NJ toolkit, which automatically checks the correctness of integerand floating point-based optimizations.
Precondition Inference for Peephole Optimizations in LLVM
- Computer ScienceArXiv
- 2016
This paper proposes ALIVE-INFER, a data-driven approach that infers preconditions for peephole optimizations expressed in Alive, and demonstrates the applicability of this technique to generalize 54 optimization patterns generated by Souper, an LLVM~IR--based superoptimizer.
Alive-FP: Automated Verification of Floating Point Based Peephole Optimizations in LLVM
- Computer ScienceSAS
- 2016
This paper proposes Alive-FP, an automated verification framework for floating point based peephole optimizations in LLVM that handles a class of floating point optimizations and fast-math optimizations involving signed zeros, not-a-number, and infinities, which do not result in loss of accuracy.
Alive-Infer: data-driven precondition inference for peephole optimizations in LLVM
- Computer SciencePLDI 2017
- 2017
This paper proposes Alive-Infer, a data-driven approach that infers preconditions for peephole optimizations expressed in Alive, and demonstrates the applicability of this technique to generalize 54 optimization patterns generated by Souper, an LLVM IR–based superoptimizer.
Loop Detection by Logically Constrained Term Rewriting
- Computer ScienceVSTTE
- 2018
New criteria to find loops in logically constrained rewrite systems which are implemented in the tool Ctrl are presented, illustrating the usefulness of these criteria in three example applications: to finding loops in LLVM peephole optimizations, to detect looping executions of C programs, and to establish nontermination of integer transition systems.
Future Directions for Optimizing Compilers
- Computer ScienceArXiv
- 2018
The problem of making optimizing compilers faster, less buggy, and more capable of generating high-quality output is examined.
How software engineering research aligns with design science: a review
- Computer ScienceEmpirical Software Engineering
- 2020
The design science lens helps emphasize the theoretical contribution of research output—in terms of technological rules—and reflect on the practical relevance, novelty and rigor of the rules proposed by the research.
References
SHOWING 1-10 OF 52 REFERENCES
Provably correct peephole optimizations with alive
- Computer SciencePLDI 2015
- 2015
Alive is presented, a domain-specific language for writing optimizations and for automatically either proving them correct or else generating counterexamples, and can be automatically translated into C++ code that is suitable for inclusion in an LLVM optimization pass.
Automatically proving the correctness of compiler optimizations
- Computer SciencePLDI '03
- 2003
A technique for automatically proving compiler optimizations sound, meaning that their transformations are always semantics-preserving, and a domain-specific language, called Cobalt, is presented for implementing optimizations as guarded rewrite rules.
Compiler validation via equivalence modulo inputs
- Computer SciencePLDI 2014
- 2014
This work introduces equivalence modulo inputs (EMI), a simple, widely applicable methodology for validating optimizing compilers, and profiles a program's test executions and stochastically prune its unexecuted code to create a practical implementation.
VOC: A Methodology for the Translation Validation of OptimizingCompilers
- Computer ScienceJ. Univers. Comput. Sci.
- 2003
There is a growing awareness, both in industry and academia, of the crucial role of formally verifying the translation from high-level source-code into low-level ob- ject code that is typically…
Finding and understanding bugs in C compilers
- Computer SciencePLDI '11
- 2011
Csmith, a randomized test-case generation tool, is created and spent three years using it to find compiler bugs, and a collection of qualitative and quantitative results about the bugs it found are presented.
Compiler testing via a theory of sound optimisations in the C11/C++11 memory model
- Computer SciencePLDI 2013
- 2013
A strategy to reduce the hard problem of hunting concurrency compiler bugs to differential testing of sequential code is designed and a tool that puts this strategy to work is built, identifying several mistaken write introductions and other unexpected behaviours in the latest release of the gcc compiler.
Translation validation for an optimizing compiler
- Computer SciencePLDI '00
- 2000
A practical translation validation infrastructure, able to check the correctness of many of the transformations performed by a realistic compiler, can be implemented with about the effort typically required to implement one compiler pass.
A termination analyzer for Java bytecode based on path-length
- Computer ScienceTOPL
- 2010
This article presents the first existing termination analyzer for Java bytecode dealing with any kind of data structures dynamically allocated on the heap and which does not require any help or annotation on the part of the user.
Automated soundness proofs for dataflow analyses and transformations via local rules
- Computer SciencePOPL '05
- 2005
Rhodium is presented, a new language for writing compiler optimizations that can be automatically proved sound, and has specified and automatically proven the soundness of all of Cobalt's optimizations plus a variety of optimizations not expressible in Cobalt.
Looper: Lightweight Detection of Infinite Loops at Runtime
- Computer Science2009 IEEE/ACM International Conference on Automated Software Engineering
- 2009
When a running program becomes unresponsive, it is often impossible for a user to determine if the program is performing some useful computation or if it has entered an infinite loop. We present…