Correctness Testing of Loop Optimizations in C and C++ Compilers

Remi van Veen, Marcel Beemster, C. Grelck · UvA-DARE (University of Amsterdam) · 2018

Test coverage is often measured by the number of source lines of code that is executed by tests. However, compilers can apply transformations to the code to optimize the performance or size of a program. These transformations can remove parts of the original code, but they can also add new code by creating specialized copies and additional conditional branches. This means that while at source code level it seems as if all code would be tested, it is quite possible that the actually executed machine code is only partially tested. This project investigates how confidence in the correctness of a compiler's optimizations can be improved. To this end we create a suite of programs that explicitly trigger compiler optimizations and test their correctness with coverage on machine code level. Once confidence into the correctness of the compiler has been established, it becomes sufficient to test application software with high source code coverage only.

Read the paper · More papers on PaperTik