Translation and Run-Time Validation of Loop Transformations

This paper presents new approaches to the validation of loop optimizations that compilers use to obtain the highest performance from modern architectures. Rather than verify the compiler, the approach of translation validationperforms a validation check after every run of the compiler, producing a formal proof that the produced target code is a correct implementation of the source code.As part of an active and ongoing research project on translation validation, we have previously described approaches for validating optimizations that preserve the loop structure of the code and have presented a simulation-based general technique for validating such optimizations. In this paper, for more aggressive optimizations that alter the loop structure of the code—such as distribution, fusion, tiling, and interchange—we present a set of permutation ruleswhich establish that the transformed code satisfies all the implied data dependencies necessary for the validity of the considered transformation. We describe the extensions to our tool voc-64 which are required to validate these structure-modifying optimizations.This paper also discusses preliminary work on run-time validation of speculative loop optimizations. This involves using run-time tests to ensure the correctness of loop optimizations whose correctness cannot be guaranteed at compile time. Unlike compiler validation, run-time validation must not only determine when an optimization has generated incorrect code, but also recover from the optimization without aborting the program or producing an incorrect result. This technique has been applied to several loop optimizations, including loop interchange and loop tiling, and appears to be quite promising.

[1]  Robert W. Floyd,et al.  Assigning Meanings to Programs , 1993 .

[2]  George C. Necula,et al.  The design and implementation of a certifying compiler , 1998, PLDI.

[3]  Sabine Glesner,et al.  Verified Code Generation for Embedded Systems , 2002, COCV@ETAPS.

[4]  Gerda Janssens,et al.  Geometric Model Checking: An Automatic Verification Technique for Loop and Data Reuse Transformations , 2002, COCV@ETAPS.

[5]  Amir Pnueli,et al.  The Code Validation Tool (CVT) , 1998, International Journal on Software Tools for Technology Transfer (STTT).

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

[7]  David L. Dill,et al.  CVC: A Cooperating Validity Checker , 2002, CAV.

[8]  Ernst-Rüdiger Olderog,et al.  Correct System Design, Recent Insight and Advances, (to Hans Langmaack on the occasion of his retirement from his professorship at the University of Kiel) , 1999 .

[9]  Carl Christian Frederiksen Correctness of Classical Compiler Optimizations using CTL , 2002, COCV@ETAPS.

[10]  Xavier Rival,et al.  Abstract Interpretation-Based Certification of Assembly Code , 2002, VMCAI.

[11]  George C. Necula,et al.  Proof-carrying code , 1997, POPL '97.

[12]  Amir Pnueli,et al.  VOC: A Methodology for the Translation Validation of OptimizingCompilers , 2003, J. Univers. Comput. Sci..

[13]  Amir Pnueli,et al.  Deciding Equality Formulas by Small Domains Instantiations , 1999, CAV.

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

[15]  Natarajan Shankar,et al.  ICS: Integrated Canonizer and Solver , 2001, CAV.

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

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

[18]  Ken Kennedy,et al.  Optimizing Compilers for Modern Architectures: A Dependence-based Approach , 2001 .

[19]  Krishna V. Palem,et al.  Software bubbles: using predication to compensate for aliasing in software pipelines , 2002, Proceedings.International Conference on Parallel Architectures and Compilation Techniques.

[20]  Gerhard Goos,et al.  Verification of Compilers , 1999, Correct System Design.