LifeJacket: verifying precise floating-point optimizations in LLVM

Users depend on correct compiler optimizations but floating-point arithmetic is difficult to optimize transparently. Manually reasoning about all of floating-point arithmetic’s esoteric properties is error-prone and increases the cost of adding new optimizations. We present an approach to automate reasoning about precise floating-point optimizations using satisfiability modulo theories (SMT) solvers. We implement the approach in LifeJacket, a system for automatically verifying precise floating-point optimizations for the LLVM assembly language. We have used LifeJacket to verify 43 LLVM optimizations and to discover eight incorrect ones, including three previously unreported problems. LifeJacket is an open source extension of the Alive system for optimization verification.

[1]  John Regehr,et al.  Provably correct peephole optimizations with alive , 2015, PLDI.

[2]  Ganesh Gopalakrishnan,et al.  Efficient search for inputs causing high floating-point errors , 2014, PPoPP '14.

[3]  Philipp Rümmer,et al.  An SMT-LIB Theory of Binary Floating-Point Arithmetic ∗ , 2010 .

[4]  Sebastian Buchwald Optgen: A Generator for Local Optimizations , 2015, CC.

[5]  Alexander Aiken,et al.  Stochastic optimization of floating-point programs with tunable precision , 2014, PLDI.

[6]  Guillaume Melquiond,et al.  Verified Compilation of Floating-Point Computations , 2014, Journal of Automated Reasoning.

[7]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[8]  Viktor Kuncak,et al.  Sound compilation of reals , 2013, POPL.

[9]  Philipp Rümmer,et al.  Approximations for Model Construction , 2014, IJCAR.

[10]  Pavel Panchekha,et al.  Automatically improving accuracy for floating point expressions , 2015, PLDI.

[11]  Alexander Aiken,et al.  Verifying bit-manipulations of floating-point , 2016, PLDI.

[12]  C. Severance,et al.  IEEE 754: An Interview with William Kahan , 1998, Computer.

[13]  Santosh Nagarakatte,et al.  Alive-FP: Automated Verification of Floating Point Based Peephole Optimizations in LLVM , 2016, SAS.

[14]  Ganesh Gopalakrishnan,et al.  Rigorous Estimation of Floating-Point Round-off Errors with Symbolic Taylor Expansions , 2015, FM.

[15]  Armando Solar-Lezama,et al.  Towards optimization-safe systems: analyzing the impact of undefined behavior , 2013, SOSP.