Theory and algorithms for the generation and validation of speculative loop optimizations

Translation validation is a technique that verifies the results of every run of a translator such as a compiler, instead of the translator itself. Previous papers by the authors and others have described translation validation for compilers that perform loop optimizations (such as interchange, tiling, fusion, etc), using a proof rule that treats loop optimizations as permutations. In this paper we describe an improved permutation proof rule which considers the initial conditions and invariant conditions of the loop. This new proof rule not only improves the validation process for compile-time optimizations, it can also be used to ensure the correctness of speculative loop optimizations, the aggressive optimizations which are only correct under certain conditions that cannot be known at compile time. Based on the new permutation rule, with the help of an automatic theorem prover CVC Lite, an algorithm is proposed for validating loop optimizations. The same permutation proof rule can also be used (within a compiler for example) to generate the runtime tests necessary to support speculative optimizations.

[1]  Harry Berryman,et al.  A manual for PARTI runtime primitives , 1990 .

[2]  C. A. R. HOARE,et al.  An axiomatic basis for computer programming , 1969, CACM.

[3]  Lawrence Rauchwerger,et al.  Principles of Speculative Run-Time Parallelization , 1998, LCPC.

[4]  Allen,et al.  Optimizing Compilers for Modern Architectures , 2004 .

[5]  Sergey Berezin,et al.  CVC Lite: A New Implementation of the Cooperating Validity Checker Category B , 2004, CAV.

[6]  Amir Pnueli,et al.  Translation and Run-Time Validation of Loop Transformations , 2005, Formal Methods Syst. Des..

[7]  Benjamin Goldberg,et al.  Into the Loops: Practical Issues in Translation Validation for Optimizing Compilers , 2005, COCV@ETAPS.

[8]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[9]  Benjamin Goldberg,et al.  Run-Time Validation of Speculative Optimizations using CVC , 2003, Electron. Notes Theor. Comput. Sci..

[10]  Aaas News,et al.  Book Reviews , 1893, Buffalo Medical and Surgical Journal.

[11]  Michael Wolfe,et al.  High performance compilers for parallel computing , 1995 .

[12]  Amir Pnueli,et al.  VOC: A Translation Validator for Optimizing Compilers , 2002, COCV@ETAPS.

[13]  George C. Necula,et al.  Translation validation for an optimizing compiler , 2000, PLDI '00.

[14]  Amir Pnueli,et al.  Translation Validation , 1998, TACAS.

[15]  Monica S. Lam,et al.  A data locality optimizing algorithm , 1991, PLDI '91.