A simple, verified validator for software pipelining

Software pipelining is a loop optimization that overlaps the execution of several iterations of a loop to expose more instruction-level parallelism. It can result in first-class performance characteristics, but at the cost of significant obfuscation of the code, making this optimization difficult to test and debug. In this paper, we present a translation validation algorithm that uses symbolic evaluation to detect semantics discrepancies between a loop and its pipelined version. Our algorithm can be implemented simply and efficiently, is provably sound, and appears to be complete with respect to most modulo scheduling algorithms. A conclusion of this case study is that it is possible and effective to use symbolic evaluation to reason about loop transformations.

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

[2]  Xavier Leroy,et al.  A Formally Verified Compiler Back-end , 2009, Journal of Automated Reasoning.

[3]  Sorin Lerner,et al.  Proving optimizations correct using parameterized program equivalence , 2009, PLDI '09.

[4]  William Pugh,et al.  The Omega test: A fast and practical integer programming algorithm for dependence analysis , 1991, Proceedings of the 1991 ACM/IEEE Conference on Supercomputing (Supercomputing '91).

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

[6]  Josep Llosa,et al.  A comparative study of modulo scheduling techniques , 2002, ICS '02.

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

[8]  Amir Pnueli,et al.  TVOC: A Translation Validator for Optimizing Compilers , 2005, CAV.

[9]  Monica S. Lam,et al.  RETROSPECTIVE : Software Pipelining : An Effective Scheduling Technique for VLIW Machines , 1998 .

[10]  Andrew W. Appel,et al.  Modern Compiler Implementation in ML , 1997 .

[11]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools (2nd Edition) , 2006 .

[12]  Mary Lou Soffa,et al.  Catching and Identifying Bugs in Register Allocation , 2006, SAS.

[13]  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.

[14]  B. Ramakrishna Rau,et al.  Code generation schema for modulo scheduled loops , 1992, MICRO.

[15]  Xavier Leroy,et al.  Formal verification of translation validators: a case study on instruction scheduling optimizations , 2008, POPL '08.

[16]  Michael Stepp,et al.  Equality saturation: a new approach to optimization , 2009, POPL '09.

[17]  Amir Pnueli,et al.  Validation of Optimizing Compilers , 2001 .

[18]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .

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

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

[21]  Amir Pnueli,et al.  Validating software pipelining optimizations , 2002, CASES '02.

[22]  Xavier Leroy,et al.  Formal Verification of a C-like Memory Model and Its Uses for Verifying Program Transformations , 2008, Journal of Automated Reasoning.

[23]  Xavier Leroy,et al.  Verified validation of lazy code motion , 2009, PLDI '09.

[24]  Xavier Rival,et al.  Symbolic transfer function-based approaches to certified compilation , 2004, POPL.

[25]  Josep Llosa,et al.  Swing module scheduling: a lifetime-sensitive approach , 1996, Proceedings of the 1996 Conference on Parallel Architectures and Compilation Technique.

[26]  Xavier Leroy,et al.  Formal verification of a realistic compiler , 2009, CACM.

[27]  Aditya Kanade,et al.  A PVS Based Framework for Validating Compiler Optimizations , 2006, Fourth IEEE International Conference on Software Engineering and Formal Methods (SEFM'06).

[28]  Magnus O. Myreen,et al.  Transforming Programs into Recursive Functions , 2009, Electron. Notes Theor. Comput. Sci..

[29]  Richard A. Huff,et al.  Lifetime-sensitive modulo scheduling , 1993, PLDI '93.