Abstract
Peephole optimizations are a common source of compiler bugs. Compiler developers typically transform an incorrect peephole optimization into a valid one by strengthening the precondition. This process is challenging and tedious. This paper proposes Alive-Infer, a data-driven approach that infers preconditions for peephole optimizations expressed in Alive. Alive-Infer generates positive and negative examples for an optimization, enumerates predicates on-demand, and learns a set of predicates that separate the positive and negative examples. Alive-Infer repeats this process until it finds a precondition that ensures the validity of the optimization. Alive-Infer reports both a weakest precondition and a set of succinct partial preconditions to the developer. Our prototype generates preconditions that are weaker than LLVM’s preconditions for 73 optimizations in the Alive suite. We also demonstrate the applicability of this technique to generalize 54 optimization patterns generated by Souper, an LLVM IR–based superoptimizer.
Supplemental Material
Available for Download
This artifact contains a complete distribution of Alive-Infer (previously known as "PInfer") distributed as a virtual machine compatible with Oracle's Virtual Box software. This environment includes the Z3 solver and Alive-Infer pre-built and configured for use, and several scripts for performing precondition inference, batch timing tests, and analysis of inferred preconditions. This artifact also includes a source distribution of Alive-Infer and Z3, ready to be built and run natively to avoid the performance penalty of running in a virtual environment.
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- 4 2016/11/2 1 2 1 1 SMT Query for generating positive examples SMT Query for generating negative examples 9 X ( s ) ^ 8 X ( t ^ ( s = ) t ^ ◆ s = ◆ t )) ¬8 X ( t ^ ( s = ) t ^ ◆ s = ◆ t )) References {Patch}InstCombine pattern for ICMP. http://lists.cs.uiuc. edu/pipermail/llvm-commits/Week-of-Mon-20140811/ 230471.html. L. de Moura and N. Bjørner. Z3: An Efficient SMT Solver. In Proceedings of the Theory and Practice of Software, 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS), pages 337–340, 2008. Google Scholar
Digital Library
- T. Gehr, D. Dimitrov, and M. T. Vechev. Learning Commutativity Specifications. In 27th International Conference on Computer Aided Verification (CAV), pages 307–323, 2015.Google Scholar
- V. Le, M. Afshari, and Z. Su. Compiler Validation via Equivalence Modulo Inputs. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 216–226, 2014. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- S. Sankaranarayanan, S. Chaudhuri, F. Ivanˇci´c, and A. Gupta. Dynamic Inference of Likely Data Preconditions over Predicates by Tree Learning. In Proceedings of the 2008 International Symposium on Software Testing and Analysis, ISSTA ’08, pages 295– 306, 2008. Google Scholar
Digital Library
- R. Sharma, S. Gupta, B. Hariharan, A. Aiken, P. Liang, and A. V. Nori. A Data Driven Approach for Algebraic Loop Invariants. In Proceedings of the 22Nd European Conference on Programming Languages and Systems, ESOP’13, pages 574–592, 2013. Google Scholar
Digital Library
- X. Yang, Y. Chen, E. Eide, and J. Regehr. Finding and Understanding Bugs in C Compilers. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 283–294, 2011. Google Scholar
Digital Library
- 9 2016/11/8 9 X ( s ) ^ 8 X ( t ^ ( s = ) t ^ ◆ s = ◆ t )) ¬(8 X ( t ^ ( s = ) t ^ ◆ s = ◆ t ))) References {Patch}InstCombine pattern for ICMP. http://lists.cs.uiuc. edu/pipermail/llvm-commits/Week-of-Mon-20140811/ 230471.html. L. de Moura and N. Bjørner. Z3: An Efficient SMT Solver. In Proceedings of the Theory and Practice of Software, 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS), pages 337–340, 2008. Google Scholar
Digital Library
- T. Gehr, D. Dimitrov, and M. T. Vechev. Learning Commutativity Specifications. In 27th International Conference on Computer Aided Verification (CAV), pages 307–323, 2015.Google Scholar
- V. Le, M. Afshari, and Z. Su. Compiler Validation via Equivalence Modulo Inputs. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 216–226, 2014. Google Scholar
Digital Library
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 22–32, 2015. Google Scholar
Digital Library
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- S. Sankaranarayanan, S. Chaudhuri, F. Ivanˇci´c, and A. Gupta. Dynamic Inference of Likely Data Preconditions over Predicates by Tree Learning. In Proceedings of the 2008 International Symposium on Software Testing and Analysis, ISSTA ’08, pages 295– 306, 2008. Google Scholar
Digital Library
- R. Sharma, S. Gupta, B. Hariharan, A. Aiken, P. Liang, and A. V. Nori. A Data Driven Approach for Algebraic Loop Invariants. In Proceedings of the 22Nd European Conference on Programming Languages and Systems, ESOP’13, pages 574–592, 2013. Google Scholar
Digital Library
- X. Yang, Y. Chen, E. Eide, and J. Regehr. Finding and Understanding Bugs in C Compilers. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 283–294, 2011. Google Scholar
Digital Library
- A. Albarghouthi, I. Dillig, and A. Gurfinkel. Maximal Specification Synthesis. In Proceedings of the 43rd Annual Symposium on Principles of Programming Languages, POPL, pages 789–801, Jan. 2016. Google Scholar
Digital Library
- R. Alur, R. Bodik, G. Juniwal, M. M. K. Martin, M. Raghothaman, S. A. Seshia, R. Singh, A. Solar-Lezama, E. Torlak, and A. Udupa. Syntax-Guided Synthesis. In Proceedings of the 13th International Conference on Formal Methods in Computer-Aided Design, FMCAD, pages 1–17, Oct. 2013.Google Scholar
- R. Alur, P. ˇCerný, P. Madhusudan, and W. Nam. Synthesis of Interface Specifications for Java Classes. In Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL, pages 98–109, Jan. 2005. Google Scholar
Digital Library
- G. Ammons, R. Bodík, and J. R. Larus. Mining Specifications. In Proceedings of the 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL, pages 4–16, 2002. Google Scholar
Digital Library
- S. Bansal and A. Aiken. Automatic Generation of Peephole Superoptimizers. In Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS, pages 394–403, Oct. 2006. Google Scholar
Digital Library
- M. Barnett and K. R. M. Leino. Weakest-precondition of Unstructured Programs. In Proceedings of the 6th ACM SIGPLANSIGSOFT Workshop on Program Analysis for Software Tools and Engineering, PASTE, pages 82–87, Sept. 2005. Google Scholar
Digital Library
- S. Buchwald. Optgen: A Generator for Local Optimizations. In Proceedings of the 24th International Conference on Compiler Construction, CC, pages 171–189, 2015. ISBN 978-3-662- 46663-6.Google Scholar
- E. Clarke, O. Grumberg, S. Jha, Y. Lu, and H. Veith. Counterexample-Guided Abstraction Refinement. CAV, 2000. Google Scholar
Digital Library
- P. Cousot, R. Cousot, M. Fähndrich, and F. Logozzo. Automatic Inference of Necessary Preconditions. In Proceedings of the 14th International Conference on Verification, Model Checking, and Abstract Interpretation, VMCAI, pages 128– 148, Jan. 2013. Google Scholar
Digital Library
- L. de Moura and N. Bjørner. Z3: An Efficient SMT Solver. In Proceedings of the Theory and Practice of Software, 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, TACAS, pages 337– 340, 2008. Google Scholar
Digital Library
- I. Dillig, T. Dillig, B. Li, and K. McMillan. Inductive Invariant Generation via Abductive Inference. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA, pages 443–456, Oct. 2013. Google Scholar
Digital Library
- M. D. Ernst, J. H. Perkins, P. J. Guo, S. McCamant, C. Pacheco, M. S. Tschantz, and C. Xiao. The Daikon system for dynamic detection of likely invariants. Science of Computer Programming, 69(1):35–45, Dec. 2007. Google Scholar
Digital Library
- P. Garg, C. Löding, P. Madhusudan, and D. Neider. ICE: A Robust Learning Framework for Synthesizing Invariants. In Proceedings of the 26th International Conference on Computer Aided Verification, CAV, pages 69–87, July 2014. Google Scholar
Digital Library
- P. Garg, D. Neider, P. Madhusudan, and D. Roth. Learning Invariants using Decision Trees and Implication Counterexamples. In Proceedings of the 43rd Annual Symposium on Principles of Programming Languages, POPL, pages 499–512, Jan. 2016. Google Scholar
Digital Library
- T. Gehr, D. Dimitrov, and M. T. Vechev. Learning Commutativity Specifications. In Proceedings of the 27th International Conference on Computer Aided Verification, CAV, pages 307– 323, July 2015.Google Scholar
Cross Ref
- R. Giacobazzi. Abductive analysis of modular logic programs. In Proceedings of the 1994 International Symposium on Logic programming, ISPL, pages 377–391, Nov. 1994. Google Scholar
Digital Library
- S. Gulwani, S. Jha, A. Tiwari, and R. Venkatesan. Synthesis of Loop-free Programs. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI, June 2011. Google Scholar
Digital Library
- Y. Jiang. {Patch}InstCombine pattern for ICMP. http://lists.llvm.org/pipermail/llvm-commits/ Week-of-Mon-20140818/231300.html, 2014. Retrieved 2016-11-10.Google Scholar
- A. K. John and S. Chakraborty. Quantifier Elimination for Linear Modular Constraints. In Proceedings of the 4th International Congress on Mathematical Software, ICMS, pages 295–302, Aug. 2014.Google Scholar
Cross Ref
- R. Joshi, G. Nelson, and Y. Zhou. Denali: A practical algorithm for generating optimal code. ACM Transactions on Programming Languages and Systems (TOPLAS), 28(6):967–989, Nov. 2006. Google Scholar
Digital Library
- J. Ketema, J. Regehr, J. Taneja, P. Collingbourne, and R. Sasnauskas. A superoptimizer for LLVM IR. https://github. com/google/souper. Retrieved 2016-11-14.Google Scholar
- A. Komuravelli, A. Gurfinkel, and S. Chaki. SMT-Based Model Checking for Recursive Programs. In Proceedings of the 26th International Conference on Computer Aided Verification, CAV, pages 17–34, July 2014. Google Scholar
Digital Library
- S. Kundu, Z. Tatlock, and S. Lerner. Proving optimizations correct using parameterized program equivalence. In Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI, pages 327–337, 2009. Google Scholar
Digital Library
- C. Lattner. ComputeMaskedBits and friends should know that multiplying by a power of two leaves low bits clear. https: //bugs.llvm.org//show_bug.cgi?id=19711, 2016. Retrieved 2017-03-14.Google Scholar
- V. Le, M. Afshari, and Z. Su. Compiler Validation via Equivalence Modulo Inputs. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI, pages 216–226, 2014. Google Scholar
Digital Library
- S. Lerner, T. Millstein, E. Rice, and C. Chambers. Automated Soundness Proofs for Dataflow Analyses and Transformations via Local Rules. In Proceedings of the 32nd ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, POPL, pages 364–377, 2005. Google Scholar
Digital Library
- X. Leroy. A Formally Verified Compiler Back-end. In Journal of Automated Reasoning, 2009. Google Scholar
Digital Library
- C. Liam. {Patch}Implementing a proposed InstCombine optimization. http://lists.llvm.org/pipermail/ llvm-dev/2016-April/098104.html, 2016.Google Scholar
- Retrieved 2016-11-10.Google Scholar
- N. Lopes. RFC: Killing undef and spreading poison. http://lists.llvm.org/pipermail/llvm-dev/ 2016-October/106182.html, 2016. Retrieved 2016-11-10.Google Scholar
- N. Lopes, D. Menendez, S. Nagarakatte, and J. Regehr. Provably Correct Peephole Optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI, pages 22–32, 2015. Google Scholar
Digital Library
- N. Lopes and J. Monteiro. Weakest Precondition Synthesis for Compiler Optimizations. In Proceedings of the 15th International Conference on Verification, Model Checking, and Abstract Interpretation, VMCAI, pages 203–221, 2014. Google Scholar
Digital Library
- H. Massalin. Superoptimizer: A Look at the Smallest Program. In Proceedings of the 2nd International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 122–126, 1987. Google Scholar
Digital Library
- D. Menendez and S. Nagarakatte. Alive-NJ. https:// github.com/rutgers-apl/alive-nj. Retrieved 2016-04- 16.Google Scholar
- D. Menendez and S. Nagarakatte. Termination-Checking for LLVM Peephole Optimizations. In Proceedings of the 38th International Conference of Software Engineering, ICSE, pages 191–202, May 2016. Google Scholar
Digital Library
- D. Menendez and S. Nagarakatte. Weaker (more general) precondition for bit-tests in InstructionSimplify. http://lists.llvm.org/pipermail/llvm-dev/ 2017-March/111000.html, 2017.Google Scholar
- Retrieved 2017-03- 14.Google Scholar
- D. Menendez, S. Nagarakatte, and A. Gupta. Alive-FP: Automated Verification of Floating Point Based Peephole Optimizations in LLVM. In Proceedings of the 23rd Static Analysis Symposium, pages 317–337, 2016.Google Scholar
Cross Ref
- E. Mullen, D. Zuniga, Z. Tatlock, and D. Grossman. Verified Peephole Optimizations for CompCert. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI, pages 448–461, June 2016. Google Scholar
Digital Library
- A. Nötzli and F. Brown. LifeJacket: Verifying precise floatingpoint optimizations in LLVM. http://arxiv.org/pdf/ 1603.09290v1.pdf, 2016. Retrieved 2016-04-04.Google Scholar
- S. Padhi, R. Sharma, and T. Millstein. Data-driven Precondition Inference with Learned Features. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’16, pages 42–56, 2016. Google Scholar
Digital Library
- P. M. Phothilimthana, A. Thakur, R. Bodik, and D. Dhurjati. Scaling Up Superoptimization. In Proceedings of the 21st International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS, pages 297–310, Apr. 2016. Google Scholar
Digital Library
- J. Regehr. Early Superoptimizer Results. http://blog. regehr.org/archives/1146. Retrieved 2016-11-14.Google Scholar
- J. Regehr. Signed Division and InstCombine. http://lists.llvm.org/pipermail/llvm-dev/ 2016-June/100375.html, 2016.Google Scholar
- Retrieved 2016-11- 10.Google Scholar
- S. Sankaranarayanan, S. Chaudhuri, F. Ivanˇci´c, and A. Gupta. Dynamic Inference of Likely Data Preconditions over Predicates by Tree Learning. In Proceedings of the 2008 International Symposium on Software Testing and Analysis, ISSTA ’08, pages 295–306, 2008. Google Scholar
Digital Library
- E. R. Scherpelz, S. Lerner, and C. Chambers. Automatic Inference of Optimizer Flow Functions from Semantic Meanings. In Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI, pages 135–145, June 2007. Google Scholar
Digital Library
- E. Schkufza, R. Sharma, and A. Aiken. Stochastic Superoptimization. In Proceedings of the 18th International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS, pages 305–316, 2013. Google Scholar
Digital Library
- M. N. Seghir and D. Kroening. Counterexample-Guided Precondition Inference. In Proceedings of the 22nd European Conference on Programming Languages and Systems, ESOP, pages 451–471, Mar. 2013. Google Scholar
Digital Library
- R. Sharma, S. Gupta, B. Hariharan, A. Aiken, P. Liang, and A. V. Nori. A Data Driven Approach for Algebraic Loop Invariants. In Proceedings of the 22Nd European Conference on Programming Languages and Systems, ESOP’13, pages 574–592, 2013. Google Scholar
Digital Library
- A. Solar-Lezama, L. Tancau, R. Bodik, S. Seshia, and V. Saraswat. Combinatorial Sketching for Finite Programs. Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems, pages 404–415, Oct. 2006. Google Scholar
Digital Library
- Z. Tatlock and S. Lerner. Bringing extensibility to verified compilers. In PLDI ’10: Proceedings of the ACM SIGPLAN 2010 Conference on Programming Language Design and Implementation, 2010. Google Scholar
Digital Library
- E. Torlak and R. Bodik. A Lightweight Symbolic Virtual Machine for Solver-aided Host Languages. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI, pages 530–541, June 2014. Google Scholar
Digital Library
- X. Yang, Y. Chen, E. Eide, and J. Regehr. Finding and Understanding Bugs in C Compilers. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI, pages 283–294. ACM, 2011. Google Scholar
Digital Library
- J. Zhao, S. Nagarakatte, M. M. K. Martin, and S. Zdancewic. Formalizing the LLVM Intermediate Representation for Verified Program Transformations. In Proceedings of the 39th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pages 427–440, 2012. Google Scholar
Digital Library
- J. Zhao, S. Nagarakatte, M. M. K. Martin, and S. Zdancewic. Formal Verification of SSA-Based Optimizations for LLVM. In ACM SIGPLAN 2013 Conference on Programming Language Design and Implementation, 2013. Google Scholar
Digital Library
Index Terms
Alive-Infer: data-driven precondition inference for peephole optimizations in LLVM
Recommendations
Termination-checking for LLVM peephole optimizations
ICSE '16: Proceedings of the 38th International Conference on Software EngineeringMainstream 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 ...
Provably correct peephole optimizations with alive
PLDI '15: Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and ImplementationCompilers 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 ...
Alive-Infer: data-driven precondition inference for peephole optimizations in LLVM
PLDI 2017: Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and ImplementationPeephole optimizations are a common source of compiler bugs. Compiler developers typically transform an incorrect peephole optimization into a valid one by strengthening the precondition. This process is challenging and tedious. This paper proposes ...






Comments