skip to main content
article
Public Access

Alive-Infer: data-driven precondition inference for peephole optimizations in LLVM

Published:14 June 2017Publication History
Skip Abstract Section

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.

Skip Supplemental Material Section

Supplemental Material

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  24. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  29. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  30. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  32. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  35. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  36. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  37. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  38. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  39. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  40. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  41. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  42. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  43. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  44. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  45. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  46. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  47. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  48. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  49. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  50. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  51. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  52. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  53. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  54. 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 ScholarGoogle Scholar
  55. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  56. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  57. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  58. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  59. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  60. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  61. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  62. 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 ScholarGoogle Scholar
  63. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  64. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  65. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  66. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  67. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  68. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  69. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  70. 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 ScholarGoogle Scholar
  71. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  72. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  73. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  74. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  75. 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 ScholarGoogle Scholar
  76. E. Clarke, O. Grumberg, S. Jha, Y. Lu, and H. Veith. Counterexample-Guided Abstraction Refinement. CAV, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  77. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  78. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  79. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  80. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  81. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  82. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  83. 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 ScholarGoogle ScholarCross RefCross Ref
  84. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  85. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  86. 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 ScholarGoogle Scholar
  87. 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 ScholarGoogle ScholarCross RefCross Ref
  88. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  89. 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 ScholarGoogle Scholar
  90. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  91. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  92. 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 ScholarGoogle Scholar
  93. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  94. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  95. X. Leroy. A Formally Verified Compiler Back-end. In Journal of Automated Reasoning, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  96. C. Liam. {Patch}Implementing a proposed InstCombine optimization. http://lists.llvm.org/pipermail/ llvm-dev/2016-April/098104.html, 2016.Google ScholarGoogle Scholar
  97. Retrieved 2016-11-10.Google ScholarGoogle Scholar
  98. 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 ScholarGoogle Scholar
  99. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  100. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  101. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  102. D. Menendez and S. Nagarakatte. Alive-NJ. https:// github.com/rutgers-apl/alive-nj. Retrieved 2016-04- 16.Google ScholarGoogle Scholar
  103. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  104. 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 ScholarGoogle Scholar
  105. Retrieved 2017-03- 14.Google ScholarGoogle Scholar
  106. 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 ScholarGoogle ScholarCross RefCross Ref
  107. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  108. 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 ScholarGoogle Scholar
  109. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  110. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  111. J. Regehr. Early Superoptimizer Results. http://blog. regehr.org/archives/1146. Retrieved 2016-11-14.Google ScholarGoogle Scholar
  112. J. Regehr. Signed Division and InstCombine. http://lists.llvm.org/pipermail/llvm-dev/ 2016-June/100375.html, 2016.Google ScholarGoogle Scholar
  113. Retrieved 2016-11- 10.Google ScholarGoogle Scholar
  114. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  115. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  116. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  117. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  118. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  119. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  120. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  121. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  122. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  123. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  124. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Alive-Infer: data-driven precondition inference for peephole optimizations in LLVM

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 52, Issue 6
        PLDI '17
        June 2017
        708 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/3140587
        Issue’s Table of Contents
        • cover image ACM Conferences
          PLDI 2017: Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation
          June 2017
          708 pages
          ISBN:9781450349888
          DOI:10.1145/3062341

        Copyright © 2017 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 14 June 2017

        Check for updates

        Qualifiers

        • article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!