About
compiler.ai is a research effort at re-imagining the compilation infrastructure. We employ AI algorithms to automatically optimize programs. We employ formal verification techniques to generate confidence in the correctness of the optimizations. As our research matures, we intend to provide links to working demos and downloadable packages on this page.
Quick links
- Counter demo for equivalence across C source and x86-32 assembly
- Counter demo for equivalence across unoptimized C source and optimized C source
- Counter demo for inequivalence across two C programs
- Demo for finding potential Null-Pointer Exceptions in C programs
- OOElala demo
Counter algorithm for blackbox equivalence checking
Are you an assembly language developer? Or do you want to validate the code generated by a compiler? Our equivalence checker can compute equivalence between a C program and its optimized, usually aggressively vectorized assembly code implementation. The assembly code implementation may be generated by a compiler or hand-written. The algorithm that automatically constructs an equivalence proof is calledCounter
, and to the best of our knowledge, it is the most robust equivalence checking
algorithm till date. You can
try it yourself at the following online demo links.
Our OOPSLA 2020 paper on the Counter algorithm will be out soon.Counter Demo and Examples
You can run the Counter equivalence checking algorithm for yourself here.Counter Download
Counter source code is available at github.com/compilerai/counter.OOElala optimizing compiler
Programming languages like C and C++ leave the Order of Evaluation of operands in an expression unspecified. This provides optimization leverage, with resulting speedups as high as 2.6x on real-world code. This optimization opportunity was hitherto not exploited by modern compilers. Our optimizing compiler,OOElala
, which is based onClang/LLVM
, includes an algorithm to realize this latent
performance opportunity. Please see
the PLDI 2020 paper
on OOElala for more details.OOElala Demo and Examples
You can try OOElala for yourself here. Here are some pre-configured examples that demonstrate OOElala in action.- MinMax (Figure 1 in paper). Speedup:
1.5x
. - Assign and Accumulate (An isomorphic pattern was discovered by OOElala in SPEC CPU2017's
imagick
application). Speedup:1.66x
- Assign and Increment Index. Speedup:
~15x
. - Read Array of Characters in a Struct (from SPEC CPU2017's
x264
) - Parsing a string (from SPEC CPU2017's
perlbench
). Speedup:5.33%
OOElala Download
OOElala source code is available at github.com/compilerai/ooelala-project.Relevant Publications
Brief descriptions of these papers are available at this Github page.- Automatic Generation of Peephole Superoptimizers – ASPLOS 2006
- Binary Translation Using Peephole Superoptimizers – OSDI 2008
- Fast Dynamic Binary Translation for the Kernel – SOSP 2013
- Blackbox Equivalence Checking across Compiler Optimizations – APLAS 2017
- Modeling Undefined Behaviour Semantics for Checking Equivalence across Compiler Optimizations – HVC 2017
- Effective Use of SMT solvers for Program Equivalence Checking through Invariant Sketching and Query Decomposition – SAT 2018
- OOElala: Order-Of-Evaluation based Alias Analysis for Compiler Optimization – PLDI 2020
- Counterexample-Guided Correlation Algorithm for Translation Validation – OOPSLA 2020 (conditionally accepted, coming soon)
Collaborate with us
We are looking for both young and accomplished researchers and engineers to work and/or collaborate with us. If you are interested in sharing the excitement and joy of participating in our efforts towards the creation of a new type of compilation infrastructure, here are some potential ways we can collaborate.- Collaborate with us remotely in our development efforts. If you are interested in such a collaboration, please send us a note. We would love to have a meaningful collaboration that may help all of us achieve our research goals faster. That said, we cannot accept all collaboration requests, as we need to carefully balance the synchronization and starting overheads with the benefits of collaborating. Such a collaboration would perhaps work best if you are already an expert working in this domain and you feel interested in knowing more about our efforts.
- Join us at IIT Delhi either as visiting faculty, Postdoc, or PhD candidate.
- Join us at IIT Delhi as a Research Associate for a minimum duration of eighteen months.
Acknowledgements: The online demo links are based on Compiler Explorer.